Skip to content

The provided 'x-amz-content-sha256' header does not match what was computed. #2

Description

@troggy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need reproNeed a manimal reproduction to showcase the situation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions