使用curl
,如果我这样做:
curl -v --upload-file tumblr_nl29hydgtP1uq22wlo1_r2_1280.jpg https://s3.amazonaws.com/mybutcket/1_myfile\?AWSAccessKeyId\=mykey\&Expires\=1427991209\&Signature\=DzspMuzu5%2Fpo43PWriJdOZnF2FA%3D
它上传就好了。但是,当我尝试在浏览器中上传时,出现此错误
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
<AWSAccessKeyId>mykey</AWSAccessKeyId>
<StringToSign>PUT
multipart/form-data
1427992617
/mybucket/1_myfile</StringToSign>
<SignatureProvided>dEyHSGBGcSmCfsZ1ahPryYTaB0U=</SignatureProvided>
<StringToSignBytes>50 55 54 0a 0a 6d 75 6c 74 69 70 61 72 74 2f 66 6f 72 6d 2d 64 61 74 61 0a 31 34 32 37 39 39 32 36 31 37 0a 2f 6d 6f 6e 65 67 72 61 70 68 2e 64 65 76 2e 75 70 6c 6f 61 64 73 2f 31 5f 6d 79 66 69 6c 65</StringToSignBytes>
<RequestId>F2C56B03E9F27E3F</RequestId>
<HostId>4sC6jReptppcxmE5yb5MvcZ70cB/gC0obCMEZHI+2zC/qqNFtxHd2wU2+niCHBHV</HostId>
</Error>
我Request Headers
的已附上