vue-s3-dropzone icon indicating copy to clipboard operation
vue-s3-dropzone copied to clipboard

SignatureDoesNotMatch Error

Open fbeauchemin opened this issue 7 years ago • 4 comments

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 ...

fbeauchemin avatar Oct 26 '18 18:10 fbeauchemin

same here

asagage avatar Nov 01 '18 14:11 asagage

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>

asagage avatar Nov 01 '18 14:11 asagage

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.

fbeauchemin avatar Nov 01 '18 15:11 fbeauchemin

Setting responseType to text fixed it for me:

      sending(file, xhr) {
        let _send = xhr.send;
        xhr.responseType = "text";
        xhr.send = () => {
          _send.call(xhr, file);
        }
      },

androidfanatic avatar Apr 01 '19 02:04 androidfanatic