Using ASIHTTPRequest to Upload File to S3 with Content-MD5 Header

I've had success using ASI to upload files to S3. However, I am having problems uploading to work when setting the "Content-MD5" header value with the MD5 hash of the file I'm uploading. I am using the ASIS3ObjectRequest: addRequestHeader post to set the header value. The error I returned with is 403 with the message:

Request error: Error Domain = ASIHTTPRequestErrorDomain Code = 2 "The request signature we signed does not match the signature you provided. Please check your key and signature method." UserInfo = 0x5ec210 {NSLocalizedDescription = Our signed request signature does not match the signature you provided. Check your key and signing method.}

Honestly, I checked the hash value of the file by uploading the file successfully without the Content-MD5 header, and then I checked the ETag for the file, and the hash I was trying to use for the upload matches the ETag value! Any ideas?

Thanks in advance for any answer.

+3
ios amazon-s3 amazon-web-services md5 asihttprequest


source to share


No one has answered this question yet

Check out similar questions:

969
How can I generate an MD5 hash?
63
What is the algorithm for computing Amazon-S3 Etag for a file larger than 5GB?
nineteen
How do I create a temporary url to upload a file to Amazon S3 with boto library?
3
Can't upload files to Amazon S3 using Angularjs with pre-signed url
1
AFNetworking uploads file to s3 equivalent to ASIHTTPRequest setData
1
Swift, Amazon S3, eTag and MD5 for files> 5 MB
1
Calculating ETag for local file in Node.js when loaded in AWS S3
0
Signature does not match when trying to download a file to a temporary url
0
CORS uploading file to S3, got SignatureDoesNotMatch error
0
MD5 checksums when loaded into file collector



All Articles
Loading...
X
Show
Funny
Dev
Pics