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

Failed to load resource: Method PUT is not allowed by Access-Control-Allow-Methods. #81

Closed
OKNoah opened this issue Aug 20, 2016 · 4 comments

Comments

@OKNoah
Copy link

OKNoah commented Aug 20, 2016

I am able to generate what looks like a valid signing url from my back-end, but after selecting a file this is what I see in the console:

Upload progress: 0% Waiting
Failed to load resource: Method PUT is not allowed by Access-Control-Allow-Methods.
XMLHttpRequest cannot load https://amazon.s3.endpoint/myKey?AWSAccessKeyId=myValidAcccessKey&Expires=1471656383&Signature=xYZpoaKUlgMjPdarhSaqu4AwCE0%3D. Method PUT is not allowed by Access-Control-Allow-Methods.
error – "XHR error"

I have spend a lot of time making sure the CORS settings on S3 and my back-end are correct, but no joy. I have tried this with both Amazon and an S3-compatible alternative, both with the same result.

Anything I can try?

@OKNoah
Copy link
Author

OKNoah commented Aug 20, 2016

Some weird CORS thing documented nowhere.

@OKNoah OKNoah closed this as completed Aug 20, 2016
@seanadkinson
Copy link
Contributor

Yeah, CORS can be weird sometimes. Sounds like you just needed to set Access-Control-Allow-Methods correctly.

Side note: I've found that Chrome Canary provides really useful error messaging in their Network tab... way better than standard chrome.

@OKNoah
Copy link
Author

OKNoah commented Aug 22, 2016

Yeah, this was all CORS stuff on the side of the S3 hosts. Fixed now.

@abhimanusharma
Copy link

@OKNoah I am facing the same issue, Can you tell me the setting you did to resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants