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

Fix: respect baseURI for pdfjs worker URL #4865

Merged
merged 3 commits into from Dec 7, 2023
Merged

Conversation

shamoon
Copy link
Member

@shamoon shamoon commented Dec 6, 2023

Proposed change

As usual, users always point out things not on my radar.

Fixes #4848

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain):

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@shamoon shamoon requested a review from a team as a code owner December 6, 2023 21:27
@paperless-ngx-secretary paperless-ngx-secretary bot added frontend non-trivial Requires approval by several team members labels Dec 6, 2023
@github-actions github-actions bot added bug Bug report or a Bug-fix enhancement New feature labels Dec 6, 2023
@stumpylog
Copy link
Member

Was this from bringing that dependency internal that changed its location?

@shamoon
Copy link
Member Author

shamoon commented Dec 6, 2023

Yes, precisely. Basically we now bundle our own PDF.js version and we have to specify the worker file location. But actually it might even be simpler to use a relative URL, I'm going to mark this as draft to check it out (build a new image).

@shamoon shamoon marked this pull request as draft December 6, 2023 22:36
@shamoon
Copy link
Member Author

shamoon commented Dec 7, 2023

Ok yea, fix is even simpler. Since we set the documentURI we just use a relative path (that’s what we did before, just now in a different place). just wanted to make sure the user who opened the above issue confirmed this solves it 👍

@shamoon shamoon marked this pull request as ready for review December 7, 2023 14:41
@shamoon shamoon enabled auto-merge (squash) December 7, 2023 14:49
@shamoon shamoon added this to the Next Release milestone Dec 7, 2023
Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

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

Even easier, thanks!

@shamoon shamoon merged commit 2f2ecaa into dev Dec 7, 2023
30 checks passed
@shamoon shamoon deleted the feature-fix-pdf-worker-url branch December 7, 2023 15:13
Copy link
Contributor

github-actions bot commented Jan 7, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug report or a Bug-fix enhancement New feature frontend non-trivial Requires approval by several team members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] /assets/js/pdf.worker.min.js 404 Not Found when using reverse proxy with custom subpath
2 participants