Skip to content

Commit c548455

Browse files
authored
Merge pull request #1117 from nextcloud/backport/1106/stable30
[stable30] Fix path to image resources
2 parents 3b385ef + 062ba8d commit c548455

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

js/files_pdfviewer-workersrc.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-workersrc.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/workersrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function initializeCustomPDFViewerApplication() {
2929
PDFViewerApplicationOptions.set('cMapUrl', head.getAttribute('data-cmapurl'))
3030
PDFViewerApplicationOptions.set('sandboxBundleSrc', head.getAttribute('data-sandbox'))
3131
PDFViewerApplicationOptions.set('enablePermissions', true)
32-
PDFViewerApplicationOptions.set('imageResourcesPath', './js/pdfjs/web/images/')
32+
PDFViewerApplicationOptions.set('imageResourcesPath', head.getAttribute('data-imageresourcespath'))
3333
PDFViewerApplicationOptions.set('enableScripting', head.getAttribute('data-enableScripting') === true)
3434

3535
if (canDownload === '0') {

templates/viewer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<head data-workersrc="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.worker.js')) ?>?v=<?php p($version) ?>"
4343
data-enableScripting="<?php p($enableScripting ? true : false) ?>"
4444
data-sandbox="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.sandbox.js'))?>"
45-
data-cmapurl="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/cmaps/')) ?>">
45+
data-cmapurl="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/cmaps/')) ?>"
46+
data-imageresourcespath="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/images/')) ?>">
4647
<meta charset="utf-8">
4748
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
4849
<meta name="google" content="notranslate">

0 commit comments

Comments
 (0)