lundi 31 août 2015

Amazon S3 Presigned URL: Forbidden

I am trying to generate pre-signed url with .Net sdk from Amazon.

I am setting config like this:

GetPreSignedUrlRequest request = new GetPreSignedUrlRequest()
        {
            BucketName = "content.enloop",
            Key = checkinId + "/" + picId + ".jpg",
            ContentType = "image/jpeg",
            Expires = DateTime.Now.AddHours(1),
            Verb = HttpVerb.PUT
        };

and this is result:

http://ift.tt/1X6PPHv

I have the same code in javascript (NodeJs) and I can upload pictures. With this one I get 403 error. The only difference I can see in urls is that nodejs version contains "&Content-Type=image%2Fjpeg&" . Any ideas what might be wrong? Method in nodejs I use is getSignedUrl()




Aucun commentaire:

Enregistrer un commentaire