How to set type for uploading file to S3?

Viewed 67

I try to upload gif to AWS S3. URL is presigned. For presign I use Vapor for sending image it happens from React.

Here docs says: https://soto.codes/2020/12/presigned-urls.html

If you want to include some headers values with the URL you have to include the headers while signing it and the client will be required to include exactly the same headers when they use the URL.

but image/gif is sent at presign. In the return of presign I see X-Amz-SignedHeaders: content-type%3Bhost%3Bx-amz-acl.

Seems presign did his part.

Then the content upload, with PUT has also has the Content-Type: image/gif

enter image description here

Then what is wrong. Why S3 does not have the type?

No type here:

enter image description here

1 Answers

Just realised you are looking at the wrong thing. Scroll further down on the aws console page until you find the metadata section. You can also test this by running a get on the object and see what content-type is returned

Related