Hello Guys
I have been using this component without problems until I upgrade to 6.1.1, now when I'm including an external URL an exception is displayed in console and the file is not displayed
VM1172 pdf.viewer.js.jsf?ln=primefaces-extensions&v=6.1.1:20481 Uncaught (in promise) Error: file origin does not match viewer's
at validateFileURL (VM1172 pdf.viewer.js.jsf?ln=primefaces-extensions&v=6.1.1:20481)
at webViewerInitialized (VM1172 pdf.viewer.js.jsf?ln=primefaces-extensions&v=6.1.1:20500)
at <anonymous>
I found that now is required that the URL should be in the same server, apparently you could edit the variable HOSTED_VIEWER_ORIGINS to include the url as is mention in this forum (https://github.com/mozilla/pdf.js/issues/7153) but how could be fixed from PrimeExtensions???
documentViewer broken after 6.1
You are correct. The latest Mozilla PDF.js for security reasons prevents you from having a URL that is not from your server (think XSS). To make this work I would have to hack their JS to remove that check and then every time we upgrade the Mozilla PDF.js we would have to re-apply those fixes.
Do me a favor and report this bug on our GitHub page while I think about how to fix it...
https://github.com/primefaces-extension ... com/issues
Do me a favor and report this bug on our GitHub page while I think about how to fix it...
https://github.com/primefaces-extension ... com/issues
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
This will be fixed in 6.2 and has been fixed with a SNAPSHOT release for those that need this right now.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 32 guests