Skip to content

Commit

Permalink
ELEMENTS-1617: fix nuxeo-document-preview to handle the case where vi…
Browse files Browse the repository at this point in the history
…ewurl
  • Loading branch information
poonamyadav252 committed Jun 6, 2023
1 parent 57c44fc commit 218fe17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/nuxeo-document-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ import './viewers/nuxeo-video-viewer.js';
_computeObjectSource() {
if (this.document && this.document.contextParameters && this.document.contextParameters.preview) {
let { viewUrl } = this.document.contextParameters.preview;
// this feature has not been implemented in 'view vs download', this would be implemented in WEBUI-1146.
if (!viewUrl) {
viewUrl = this.document.contextParameters.preview.url;
}
if (this.xpath !== 'file:content') {
viewUrl = viewUrl.replace('/@preview/', `/@blob/${this.xpath}/@preview/`);
}
Expand Down

0 comments on commit 218fe17

Please sign in to comment.