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

Merged
merged 1 commit into from
Jan 17, 2025
Merged

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 <danxuliu@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@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