Skip to content

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Jan 16, 2025

Backport of #1106

When "./js/pdfjs/web/images/" is resolved and pretty URLs are enabled
the result is "{SERVER}/apps/files_pdfviewer/js/pdfjs/web/images/",
which works as expected. However, if pretty URLs are not enabled the
absolute path becomes
"{SERVER}/index.php/apps/files_pdfviewer/js/pdfjs/web/images/" instead.
As the images are static files they are not served by "index.php", so
they can not be found and therefore are not rendered in the PDF.

To solve that now the path is generated in PHP and provided through the
template, similarly to how it is done, for example, for the path to the
cmap files.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
@danxuliu danxuliu force-pushed the backport/1106/stable28 branch from 33daf1a to f2abfa3 Compare January 17, 2025 13:42
@danxuliu danxuliu marked this pull request as ready for review January 17, 2025 13:49
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@danxuliu danxuliu merged commit 55511d1 into stable28 Jan 17, 2025
45 checks passed
@danxuliu danxuliu deleted the backport/1106/stable28 branch January 17, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant