s3 image upload using presigned post url

75 Views Asked by At

Here I'm trying to upload image from frontend to amazon s3 using presigned post url. backend is serving the policy, signature and access key and image is also uploading successfully. But image remains in binary octet-stream. So i can't access it from web, it just get downloaded. If i change it manually as "image/jpg" or "image/png" then it's working fine.

System defined  Content-Type    binary/octet-stream

I tried to add "Content-Type" "image/jpg" in header but image must be uploaded as

multipart/form-data

and doesn't work. response error.

If i put that in "form-data" it shows error

AccessDeniedInvalid according to Policy: Extra input fields: content-type
0

There are 0 best solutions below