I'm getting The provided 'x-amz-content-sha256' header does not match what was computed. error when calling PUT on presigned URL generated with the getPartPresignedRequestInfo.
The hash generated by the lib is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 and this is a hash of the empty string. Digging into the library I've found out that aws4.sign signs over request.body, but the library doesn't provide the body hence the signature is made on empty body.
How is it working for you?
I made my code working only by using s3.getSignedUrl instead of calling getPartRequest on uploadModule. I can't figure out how to use aws4.sign without providing the body.
I'm getting
The provided 'x-amz-content-sha256' header does not match what was computed.error when calling PUT on presigned URL generated with thegetPartPresignedRequestInfo.The hash generated by the lib is
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855and this is a hash of the empty string. Digging into the library I've found out thataws4.signsigns overrequest.body, but the library doesn't provide thebodyhence the signature is made on empty body.How is it working for you?
I made my code working only by using
s3.getSignedUrlinstead of callinggetPartRequeston uploadModule. I can't figure out how to useaws4.signwithout providing the body.