From 38c4121f105a12cd3826b2d99cfa12fe98a535e8 Mon Sep 17 00:00:00 2001 From: prasad <prasad@vtiger.com> Date: Tue, 3 Jul 2018 23:01:33 +0530 Subject: [PATCH] Fixes #1028: URL fix for PDF download --- layouts/v7/modules/Documents/FilePreview.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/v7/modules/Documents/FilePreview.tpl b/layouts/v7/modules/Documents/FilePreview.tpl index 2ad707eda..090669ed2 100644 --- a/layouts/v7/modules/Documents/FilePreview.tpl +++ b/layouts/v7/modules/Documents/FilePreview.tpl @@ -51,7 +51,7 @@ {else if $OPENDOCUMENT_FILE_TYPE eq 'yes'} <iframe id="viewer" src="libraries/jquery/Viewer.js/#../../../{$DOWNLOAD_URL}" width="100%" height="100%" allowfullscreen webkitallowfullscreen></iframe> {else if $PDF_FILE_TYPE eq 'yes'} - <iframe id='viewer' src="libraries/jquery/pdfjs/web/viewer.html?file={$SITE_URL}/{$FILE_PATH}" height="100%" width="100%"></iframe> + <iframe id='viewer' src="libraries/jquery/pdfjs/web/viewer.html?file={$SITE_URL}/{$DOWNLOAD_URL|escape:'url'}" height="100%" width="100%"></iframe> {else if $IMAGE_FILE_TYPE eq 'yes'} <div style="overflow:auto;height:100%;width:100%;float:left;background-image: url({$DOWNLOAD_URL});background-color: #EEEEEE;background-position: center 25%;background-repeat: no-repeat;display: block; background-size: contain;"></div> {else if $AUDIO_FILE_TYPE eq 'yes'} -- GitLab