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
Unable to load file from aws s3 pre signed URL #399
Comments
I had the same issue.
|
We're having the same issue, the service worker and library initialize correctly but fail to load resources from a presigned url. These files can otherwise be loaded successfully. |
We came across this issue, using Azure BlobStorage and shared access signature. |
Solved the problem by changing CORS policy in s3 bucket https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-cors-configuration.html
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
thank you I've tried several methods, but this is the one that helped me the most. 👍👍 |
Hello Wojciech Maj,
I have gone through existing issues related to CORS. The domain I am requesting to has enabled CORS and has GET as well as POST in allowed method. I am still getting following error.
Now, here is what I am doing. I am basically fetching pre signed URL from aws s3 and then using this url in file props of Document.
In my network tab I see that in pre flight request allowed method is POST. However pdf.js uses GET to load PDF.
As you can see Access-Control-Request-Method: POST .
I tried sending httpHeader in file props as
But if I send like this then I am not seeing any pre flight request in network tab and CORS issue persist.
Thank you in advance!
The text was updated successfully, but these errors were encountered: