DEV Community

Discussion on: React file upload using S3 pre-signed urls

Collapse
 
pbaker0804 profile image
pbaker0804

Hi Dan! I sent an email to the author and he replied almost as fast as you :) You guys are great. He said add "sendWithFormData: false" to the options. It worked perfect, now it sends all file types to AWS without the wrapper, I can download it, view it, all the good stuff. Thanks so much!

New return:

return {
  options: {
    sendWithFormData: false,
    destination: {
      url: uploadUrl,
      method: 'PUT',
      headers: {
        'Content-Type': type
      },
    },
  },
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
danstanhope profile image
Dan Stanhope

That’s awesome! Great fix.

I’ll update the repo to include this new property.

Thanks for the help!