I am trying to upload a media file (image with any extension jpg/png/jpeg or a video) to aws s3 bucket from the postman i created my pre-signed url in my backend as following
const params = {
Bucket: 'safarni',
Key: 'posts/Photo.png',
Expires: 30* 60,
ContentType: 'binary/octet-stream'
}
return await s3.getSignedUrlPromise('putObject', params)
This successfully generates a url but I can't seem to test it using postman this is screenshots to how I adjust the request in postman
What i tried :
1- I added cors policy to my bucket and the credentials I am using is for IAM user whom i allowed put/*
2-I tried different file extensions but still the same error
Edit
I tried adding the signature version v4 to params in the above code and it throwed me an error saying unexpected key.I even tried adding it to aws config and s3 but nothing happened