From 218fe1744b2c681ee6d80ef5fb0d5b144b23a277 Mon Sep 17 00:00:00 2001 From: poonam yadav Date: Thu, 25 May 2023 14:56:07 +0530 Subject: [PATCH] ELEMENTS-1617: fix nuxeo-document-preview to handle the case where viewurl --- ui/nuxeo-document-preview.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/nuxeo-document-preview.js b/ui/nuxeo-document-preview.js index 8b0cba6dc..4bb0d9240 100644 --- a/ui/nuxeo-document-preview.js +++ b/ui/nuxeo-document-preview.js @@ -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/`); }