vue-s3-dropzone
vue-s3-dropzone copied to clipboard
SignatureDoesNotMatch Error
Do you have any idea why I would get a SignatureDoesNotMatch error? CORS and everything are set properly... just can't make the demo work ...
same here
I got mine working. Turns it it was a CORS issue and I was getting the signature error when attempting to view the original request in my browser .
The cors policy I was able to use for testing was...
<CORSConfiguration> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>PUT</AllowedMethod> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>
No luck with that config but I managed to have it work with a barebone PUT without the Content-Type header when uploading. Specifying it when generating the pre-signed url didn't cause any issues.
At this point, I'm not sure who's to blame but dropzone.js seems to always set the Content-Type header, even when set to empty string or null.
Setting responseType to text fixed it for me:
sending(file, xhr) {
let _send = xhr.send;
xhr.responseType = "text";
xhr.send = () => {
_send.call(xhr, file);
}
},