title: why when i choose another file and submit, another request with the old file is sent?
body: <p>Hi i'm using <a href="https://github.com/blueimp/jQuery-File-Upload" rel="nofollow">Jquery Upload plugin</a>. I've got this problem:</p>
  
  <p>when i upload the first file this work fine,a single request is sent.</p>
  
  <p>But if i select a second file and i upload it,two request are sent and not one how i expected, the first with the old file and the second with the new one. 
  how i can avoid this behavior?</p>
  
  <p>here's the code:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;form id="upload"   &gt;
  Select video to upload:
  &lt;input id="fileupload" type="file" name="upl" data-url="php/fileUploader/uploaderVideoHandler.php" &gt;
  &lt;input type="submit" value="Upload " name="submit"&gt;
  </code></pre>
  
  <p></p>
  
  <p>javascript:</p>
  
  <pre><code>$(function () {
  $('#fileupload').fileupload({
     method:'POST',
      acceptFileTypes: /(\.|\/)(mp4)$/i,
      dataType: 'json',
      maxNumberOfFiles: 1,
      replaceFileInput:false,
      autoUpload:false,
      add: function (e, data) {
          data.context = $('#upload').submit(
  
              function (e) {  
                              e.preventDefault();
  
                              data.submit();
              });
      },
      done: function (e, data) {
          data.file
          $('#progress .bar').text('Upload finished.');
      },
         progressall: function (e, data) {
      var progress = parseInt(data.loaded / data.total * 100, 10);
      $('#progress .bar').css(
          'width',
          progress + '%'
        );
      }
    });
   });
  </code></pre>
  
  <p>i try to reset data.files with </p>
  
  <pre><code>data.files.pop();
  </code></pre>
  
  <p>but doesn't work.</p>
  
  <p><strong>Solved:</strong>
  Instead using </p>
  
  <pre><code> &lt;input type="submit" value="Upload " name="submit"&gt;
  </code></pre>
  
  <p>i used a button</p>
  
  <pre><code> &lt;button id="up_btn"&gt;upload&lt;/button&gt;
  </code></pre>
  
  <p>and i've changed add function to:</p>
  
  <pre><code>    $("#up_btn").off('click').on('click', function () {
          e.preventDefault();
          data.submit();
          return false;
      });
  </code></pre>