title: File Upload to S3 - 0 bytes
body: <p>I'm using the text-to-mp3 module to create an text-to-speech MP3 file. Right now, the file is being saved to my file system successfully. I'm trying to upload it to S3 as well. It shows up in S3, but the file is empty (0 bytes).</p>
  
  <pre><code>txtomp3.getMp3(myverse, function(err, binaryStream){
  
    if(err){
      console.log(err);
      return;
    }
    var file = fs.createWriteStream("FileName.mp3"); // write it down the file
    file.write(binaryStream);
    file.end();
  
    var myfile = fs.createReadStream("FileName.mp3");
  
  AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' });
  
    var s3 = new AWS.S3();
    s3.putObject({
      Bucket: 'myverses',
      Key: 'del2.mp3',
      Body: myfile,
      ACL: 'public-read'
    },function (resp) {
      console.log(arguments);
      console.log('Successfully uploaded package.');
    });
    });
    });
  </code></pre>