Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    Oh, I forgot to mention that I already had the CORS configuration policy set up in my bucket. That was such an obvious thing that I didn't think to mention it. Commented Jan 29, 2020 at 18:16
  • Just to be sure, first check if your file type is not wrong. As I see you're naming it with .jpg but content-type is jpeg If that doesnt help, try to do this request to upload: axios.put(presignedUrl, null, file, { isMultipartForm: false, headers: { 'Content-Type': file.type } }); Hope it helps ;) Commented Jan 29, 2020 at 18:30
  • Another thing that may helps is generate presignedUrl and uploadFile all by client side Commented Jan 29, 2020 at 18:32
  • 1
    You suggested generating the presignedUrl client side. How can I do that without revealing the AWS Access and Secret Keys? Commented Jan 29, 2020 at 18:45
  • 1
    There's no need to create the pre-signed URL client-side. That's a red herring, and generally a bad security practice. Commented Jan 30, 2020 at 1:12