title: Piping a multipart file upload to a S3 bucket
body: <p>I would like to pipe a file upload that I receive from a multipart request to a S3 bucket using <code>express</code> and <code>aws-sdk</code>.</p>
  
  <p>I use the <code>upload</code> function, it can use a readable stream for the <code>Body</code> parameter.</p>
  
  <pre class="lang-js prettyprint-override"><code>await s3Client
    .upload({
      Bucket: 'some_bucket',
      Key: `records/recordXYZ`,
      Body: req,
      ContentType: 'audio/x-wav,
    })
    .promise();
  </code></pre>
  
  <p><code>req</code> is from express. The request is correctly parsed, the issue is that in the created file in S3 I retrieve some fields from the multipart request that I don't want into. The file is unreadable.</p>
  
  <p>What is inside the file in S3 :</p>
  
  <pre><code>--JP2kMlzhqj2uAUdy4al132WFLRexf1
  Content-Disposition: form-data; name="aFile"; filename="test.wav"
  Content-Type: audio/wav
  Content-Transfer-Encoding: binary
  
  RIFF|  WAVEfmt ...
  </code></pre>
  
  <p>Want I need is only :</p>
  
  <pre><code>RIFF|  WAVEfmt ...
  </code></pre>