title: jQuery File Upload done function
body: <p>I've modified the example code provided on jQuery File Upload's <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin" rel="nofollow">Wiki</a> My scripting works for the <code>add</code> callback but not the <code>done</code> callback. The server is getting the post correctly and returning a JSON response. </p>
  
  <p>I've noticed in the source code some of the callbacks are commented out. I'm not sure if I should uncomment them or not. Or use the callback <code>fileuploaddone</code> But removing the comment did not work.</p>
  
  <p>Not sure if i'm doing this correctly. I'd like the server to return me a JSON object describing the image I just uploaded so the next step of my form can link the image with a backbone.js model.</p>
  
  <pre><code>&lt;form id="uploadform"&gt;
      &lt;input id="fileupload" type="file" name="imagefile" data-url="imagefiles" multiple&gt;
      &lt;button type="#" class="btn btn-primary uploadfile" style="display: none"&gt;Upload&lt;/button&gt;
      &lt;div id="progress"&gt;
          &lt;div class="bar" style="width: 0%;"&gt;&lt;/div&gt;
      &lt;/div&gt;      
  &lt;/form&gt;
  &lt;script&gt;
  $(function () {
      $('#fileupload').fileupload({
          dataType: 'json',
          done: function (e, data) {              
          data.context = $('.uploadfile').css('display','none')
              utils.addValidationSuccess('Added file: ' + data.jqXHR.name);
          },
          progressall: function (e, data) {
              var progress = parseInt(data.loaded / data.total * 100, 10);
              $('#progress .bar').css(
                  'width',
                  progress + '%'
              );
          },
          add: function (e, data) {
              console.log('added');
              data.context = $('.uploadfile')
                  .css('display','block')
                  .click(function () {
                      utils.showAlert('Uploading','...', 'alert-warning');
                      data.submit();
                  });
          }
      });
  });
  &lt;/script&gt;
  </code></pre>