You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an problem trying to load PDFs from a URL/Parameter object.
I am using latest version react-pdf2.5.2, react-6.2.0, with the latest version of create-react-app.
I asked PHP to solve the problem of Same-origin policy by adding "Access-Control-Allow-Origin: '*'", but failed. There is no way to solve the problem.
Console output: Failed to load http://139.224.220.33:8868/Upload/video/20180112/1515721300451425.pdf: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Using onLoadError/onSourceError callbacks, i get the message 'onSourceSuccess : undefined, onLoadError: UnknownErrorException {name: "UnknownErrorException", message: "Failed to fetch", details: "UnknownErrorException: Failed to fetch"}'.
Thank you very much!
The text was updated successfully, but these errors were encountered:
Hi,
Thanks awesome. Thanks for the quick response!
I had read the discussed of #36 before i asked.The PHP can solve cross-domain problems by setting "Access Control-Allow-Origin: '*' or building a simple proxy to pass the file through the server, but here it is invalid. Could you give some advice to the PHP?
Thank you in advance!
I'm no expert in PHP, sorry. You'd need to ask somewhere else. All I know is that your server does not set this HTTP header, and that's why you see this error.
Hello Wojciech Maj,
I have an problem trying to load PDFs from a URL/Parameter object.
I am using latest version react-pdf2.5.2, react-6.2.0, with the latest version of create-react-app.
I asked PHP to solve the problem of Same-origin policy by adding "Access-Control-Allow-Origin: '*'", but failed. There is no way to solve the problem.
Console output: Failed to load http://139.224.220.33:8868/Upload/video/20180112/1515721300451425.pdf: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Using onLoadError/onSourceError callbacks, i get the message 'onSourceSuccess : undefined, onLoadError: UnknownErrorException {name: "UnknownErrorException", message: "Failed to fetch", details: "UnknownErrorException: Failed to fetch"}'.
Thank you very much!
The text was updated successfully, but these errors were encountered: