title: "Unsupported body payload object" when trying to upload to Amazon S3
body: <p>I want to upload a file from my frontend to my Amazon S3 (AWS).</p>
  
  <p>I'm using dropzone so I convert my file and send it to my backend. </p>
  
  <p>In my backend my file is like:</p>
  
  <pre><code>{ fieldname: 'file',
  originalname: 'test.torrent',
  encoding: '7bit',
  mimetype: 'application/octet-stream',
  buffer: { type: 'Buffer', data: [Array] },
  size: 7449 },
  </code></pre>
  
  <p>and when I try to upload my file with my function: </p>
  
  <pre><code>var file = data.patientfile.file.buffer;
  
          var params = { Bucket: myBucket, Key: data.patientfile.file.fieldname, Body: file };
  
          s3.upload(params, function (err, data) {
              if (err) {
                  console.log("******************",err)
              } else {
                  console.log("Successfully uploaded data to myBucket/myKey");
              }
          });
  </code></pre>
  
  <p>I get as error:</p>
  
  <blockquote>
    <p>Unsupported body payload object</p>
  </blockquote>
  
  <p>Do you know how can I send my file?</p>
  
  <p>I have tried to send it with <code>putobject</code> and get a similar error.</p>