javascript - Signature does not match s3 uploading object -


i'm trying implement unploading of image amazon s3 using rest api. i've seen docs problem i'm using temporary credential expire hour. below response

{  accesskey: "mykey"  secretkey: "mysecret"  token: "mytemptoken"  expiry: 1381128021000 } 

my policy

policy_json = { "expiration": "2013-12-03t12:29:27.000z",             "conditions": [                     ["eq", "$bucket", this.get('bucket')],                     ["starts-with", "$key", this.get('key')],                     {"acl": this.get('acl')},                     {"success_action_redirect": this.get('successactionredirect')},                     ["starts-with", "$content-type", this.get('contenttype')]             ]           }; 

here tried far: using chrome advance rest client entered url: https://mybucket.s3.amazonaws.com/avatars/test@domain.com headers of

authorization: aws mykey:cxp5qqo6q552vdyui0ablsd/pts= x-amz-security-token: mytemptoken x-amz-date: mon, 07 oct 2013 06:20:37 gmt 

the result was: 403 forbidden , saying signaturedoesnotmatch. able accomplish uploading of object using rest api of s3 (not using of sdk's). client asked me if possible build using javascript. possible?

should not sign content? check this how sign. after signing have pass signature value in authorization header.

authorization: aws awsaccesskeyid:signature


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -