How to upload a file from Postman using AWS S3 signed url?

Question:

I want to achieve the following –
1. Generate a signed URL
2. Upload a file (image.jpg), to the URL using Postman

I am using AWS Node SDK to create the URL,
Following is the code –

The code creates an URL like –

Here is the Postman response –

Postman call –
enter image description here

——————————————————————————
enter image description here

I tried following this –
https://medium.com/@aidan.hallett/securing-aws-s3-uploads-using-presigned-urls-aa821c13ae8d

I also tried various combinations, of the Key in code and filename to upload having the same name,
different Content-Type combination,
But no luck.

Answer:

Postman added hidden headers. If I remove the Content-Type header, The Put request will work as expected.

enter image description here

Leave a Reply