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

[stable30] Fix path to image resources #1117

Merged
merged 2 commits into from
Jan 19, 2025
Merged

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.

Copy link
Collaborator

@szaimen szaimen 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

@szaimen
Copy link
Collaborator

szaimen commented Jan 16, 2025

/compile amend /

@szaimen szaimen marked this pull request as ready for review January 16, 2025 10:36
@szaimen
Copy link
Collaborator

szaimen commented Jan 16, 2025

/compile amend /

@szaimen szaimen closed this Jan 17, 2025
@szaimen szaimen reopened this Jan 17, 2025
@szaimen szaimen force-pushed the backport/1106/stable30 branch from 25a1bca to de59d6b Compare January 17, 2025 12:16
@szaimen
Copy link
Collaborator

szaimen commented Jan 17, 2025

/compile amend /

danxuliu and others added 2 commits January 19, 2025 13:36
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: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the backport/1106/stable30 branch from de59d6b to 062ba8d Compare January 19, 2025 12:38
@susnux susnux merged commit c548455 into stable30 Jan 19, 2025
36 checks passed
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.

4 participants