bradleyg / django-s3direct

Directly upload files to S3 compatible services with Django.
MIT License
661 stars 234 forks source link

x-amz-content-sha256 not in SignedHeaders #249

Open isk-cdn opened 2 years ago

isk-cdn commented 2 years ago

I receiving errors: <Error><Code>AccessDenied</Code><Message>There were headers present in the request which were not signed</Message><Resource>/scs-attachments/uploads/image.png?uploads</Resource><RequestId>fb6f9b042f917b7b</RequestId><HeadersNotSigned>x-amz-content-sha256</HeadersNotSigned></Error>

According to AWS documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html) signed headers should include x-amz-content-sha256: '...SignedHeaders=date;host;x-amz-content-sha256;x-amz-date;x-amz-storage-class..'

But uploading request does not contain these headers in SignedHeaders: image

How to solve this problem?