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

[stable29] Fix path to image resources #1115

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

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:41
@szaimen szaimen closed this Jan 17, 2025
@szaimen szaimen reopened this Jan 17, 2025
@szaimen szaimen force-pushed the backport/1106/stable29 branch from cab23f0 to 8564660 Compare January 17, 2025 12:16
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/stable29 branch from 8564660 to 09ed00d Compare January 17, 2025 13:35
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 👍

As the compile bot is in lazy mode I built the files myself and commited them :-P

@danxuliu danxuliu merged commit 8264585 into stable29 Jan 17, 2025
37 checks passed
@danxuliu danxuliu deleted the backport/1106/stable29 branch January 17, 2025 13:45
@Altahrim Altahrim mentioned this pull request Feb 5, 2025
5 tasks
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.

3 participants