title: DropzoneS3Uploader gives UploadError:404 after successful signed URL request
body: <p>I'm building a serverless React app (using npm for development), that uses DropzoneS3Uploader to upload images to S3. I'm configuring it to use API Gateway (backed by Lambda) to request a signed URL before uploading a file to an S3 bucket</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const uploadOptions = {
    s3Path: '/&lt;folder&gt;/',  
    signingUrl: 'https://&lt;my-api&gt;.eu-west-1.amazonaws.com/Prod/&lt;api&gt;',
    signingUrlMethod: 'POST',
    accept: 'image/*',
    autoUpload: true 
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p>The render method goes on to return component as follows...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
      &lt;DropzoneS3Uploader
     onFinish={this.handleFinishedUpload}
     s3Url='http://&lt;my-bucket&gt;.s3-website-eu-west-1.amazonaws.com'
     upload={uploadOptions}
     /&gt;  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When this is executed it manages to generate the signed URL fine..</p>
  
  <p>Request URL: https://.eu-west-1.amazonaws.com/Prod/?objectName=&amp;contentType=image%2Fjpeg
  Request Method: POST
  Status Code: 200 </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{"signed_url":"https://&lt;my-bucket&gt;.eu-west-1.amazonaws.com/&lt;some_image.jpg&gt;?X-Amz-Algorithm=AWS4-HMAC-....X-Amz-Signature=...&amp;X-Amz-SignedHeaders=host"}</code></pre>
  </div>
  </div>
  </p>
  
  <p>However it goes straight from that into a 404 (stacktrace below). I'm starting to wonder if npm tries to cache the image as a temp file? Whatever the problem it cant seem to reference the server/image during the PUT request to S3...</p>
  
  <p>Request URL: <a href="http://localhost:3000/undefined" rel="nofollow noreferrer">http://localhost:3000/undefined</a>
  Request Method: PUT
  Status Code: 404 Not Found</p>
  
  <p><a href="http://localhost:3000/undefined" rel="nofollow noreferrer">http://localhost:3000/undefined</a> 404 (Not Found)
  ./node_modules/react-dropzone-s3-uploader/node_modules/react-s3-uploader/s3upload.js.S3Upload.uploadToS3 @ s3upload.js:171
  (anonymous) @ s3upload.js:108
  XMLHttpRequest.send (async)
  ./node_modules/react-dropzone-s3-uploader/node_modules/react-s3-uploader/s3upload.js.S3Upload.executeOnSignedUrl @ s3upload.js:113
  ./node_modules/react-dropzone-s3-uploader/node_modules/react-s3-uploader/s3upload.js.S3Upload.uploadFile @ s3upload.js:178
  (anonymous) @ s3upload.js:53
  ...</p>
  
  <p>There is a 'server' option as part of the DropzoneS3Uploader upload options. Leave it blank and i get this error, populate it with someone else and it replaces error with whatever server URL I mention. As mentioned, I plan to ru this serverless so dont have a server to mention.</p>
  
  <p>Anyone else seen this before or have any suggestions?</p>
  
  <p>I switch to Dropzone and use axios and it works ok, so am wondering if DropzoneS3Uploader is just abstracting too much of the implementation code away to allow this behaviour to be controlled?</p>
  
  <p>Thanks!</p>