title: AWS SDK JavaScript: how display upload progress of AWS.S3.putObject?
body: <p>I'm developing a JavaScript client to upload files directly to Amazon S3.</p>
  
  <pre><code>&lt;input type="file" id="file-chooser" /&gt; 
  &lt;button id="upload-button"&gt;Upload to S3&lt;/button&gt;
  &lt;div id="results"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
    var bucket = new AWS.S3({params: {Bucket: 'myBucket'}});
  
    var fileChooser = document.getElementById('file-chooser');
    var button = document.getElementById('upload-button');
    var results = document.getElementById('results');
    button.addEventListener('click', function() {
      var file = fileChooser.files[0];
      if (file) {
        results.innerHTML = '';
  
        var params = {Key: file.name, ContentType: file.type, Body: file};
        bucket.putObject(params, function (err, data) {
          results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
        });
      } else {
        results.innerHTML = 'Nothing to upload.';
      }
    }, false);
  &lt;/script&gt;
  </code></pre>
  
  <p>The example from Amazon documentation works fine, but it doesn't provide any feedback on the upload progress.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>