Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] Fix path to image resources #1114

Draft
wants to merge 1 commit into
base: stable28
Choose a base branch
from

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Jan 16, 2025

Backport of #1106

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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]>

[skip ci]
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