You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The provided 'x-amz-content-sha256' header does not match what was computed. #2
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.signsigns 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.
Hmm, weird. I'm not sure that the body property is involved here as presigned part request works on my side whereas I don't provide any body to the aws4.sign(...) call as you can see in modbox codebase. Do you use the client side lib along the backend one ? Could you provide a minimal reproduction code so I could investigate ? @troggy
Activity
toniopelo commentedon May 4, 2022
Hmm, weird. I'm not sure that the body property is involved here as presigned part request works on my side whereas I don't provide any body to the
aws4.sign(...)call as you can see in modbox codebase. Do you use the client side lib along the backend one ? Could you provide a minimal reproduction code so I could investigate ? @troggytroggy commentedon May 5, 2022
Yes, I use both frontend and backend parts. Will make a minimal example