Adminrsangal
(Admin, Box)
My feedback
3 results found
-
18 votes
Adminrsangal (Admin, Box) supported this idea ·
-
1 vote
An error occurred while saving the comment Adminrsangal (Admin, Box) shared this idea ·
-
4 votes
Adminrsangal (Admin, Box) supported this idea ·
Our Dev team has identified an issue with how the ContentPreview Panel displays the current version of the document in the Box Preview process. They are asking if there could be a small code change (explained below) so we can render the correct document version for our clients. Could you please review and let us know if this is possible?
Thanks, Steve
--------------------------------------------------------------------------------------------------------------------------------------
Requirement:
The current ContentPreview Panel loads and displays the current version of the document. We need an option to load and display a Document (File) based on FileID and VersionID, so that an older version of the file can be viewed on the ContentPreview panel.
Code we are doing it now:
We are currently loading the ContentPreview Panel as follows:
<ContentPreview
language='en-US'
messages={{ 'be.close': 'Close' }}
hasHeader='true'
isVeryLarge={true}
canPreview='true'
canDownload='true'
fileId={previewFile.id [previewfile.id]}
token={token}
onClose={contentPreviewOnClose}
file={previewFile}
isLoading='false'
onDownload={() =>eventLog(previewFile, 'Download')}
onPrint={() => eventLog(previewFile, 'Print')}
contentSidebarProps={{
detailsSidebarProps: {
hasAccessStats: false,
hasClassification: false,
hasNotices: false,
hasProperties: false,
hasRetentionPolicy: false,
hasVersions: false,
isLoading:false
},
hasActivityFeed: false,
hasMetadata: false,
hasSkills: false,
hasVersions: false,
}}
/>
How we believe the Content Preview code could be updated:
Proposed code changes is as shown below. We have added versionId={previewFile.versionId} for the Versioned Document to load (and not the current document).
If {previewFile.versionId} is null or empty then we can load the current version by default.
<ContentPreview
language='en-US'
messages={{ 'be.close': 'Close' }}
hasHeader='true'
isVeryLarge={true}
canPreview='true'
canDownload='true'
fileId={previewFile.id [previewfile.id]}
versionId={previewFile.versionId}
token={token}
onClose={contentPreviewOnClose}
file={previewFile}
isLoading='false'
onDownload={() =>eventLog(previewFile, 'Download')}
onPrint={() => eventLog(previewFile, 'Print')}
contentSidebarProps={{
detailsSidebarProps: {
hasAccessStats: false,
hasClassification: false,
hasNotices: false,
hasProperties: false,
hasRetentionPolicy: false,
hasVersions: false,
isLoading:false
},
hasActivityFeed: false,
hasMetadata: false,
hasSkills: false,
hasVersions: false,
}}
/>