presigned url is generated using: boto3.client.generate_presigned_post
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader> // it used to be Authorization earlier
</CORSRule>
</CORSConfiguration>
case 1: FAILED when I use Upload.http like this:
And I get error 412: Precondition Failed. Bucket POST must be of the enclosure-type multipart/form-data.
case 2: FAILED And when I use Upload.upload like this:
I get error 403: Invalid according to Policy: Policy Condition failed: ["eq", "$Content-Type", "application/pdf"]
case 3: SUCCESS upload but incorrect content-type Upload.load without content-type works but then in s3 it does not have the right content-type.
I'm uploading a pdf file (application/pdf)
presigned url is generated using: boto3.client.generate_presigned_post
Any pointers ?