title: How to cancel the uploading of a single file, using the Blueimp jQuery File Upload
body: <p>I am using the <a href="http://blueimp.github.com/jQuery-File-Upload/" rel="nofollow">Blueimp jQuery File Upload</a> and it's working fine, but I have a problem with canceling the upload of one of the files.</p>
  
  <p>When I add a file, I append to the html one fieldset with some additional inputs and one button - "cancel". What I need is something like this: </p>
  
  <pre><code>$(".cancelUpload").on("click", function(){
        //remove this file from the queue, The data and the file will not be uploaded
  })
  </code></pre>
  
  <p>Here is a part of my code</p>
  
  <pre><code>$('#MappeFile').fileupload({
          dataType : 'json',
          autoUpload : false,
          maxNumberOfFiles : undefined,
          maxFileSize : 2000,
          minFileSize : undefined,
          acceptFileTypes : /.+$/i,
          url : "/ajax/UploadFile.php",
          add : function(e, data) {
              $("#fileUploadButton").removeClass("toHide").on("click", function() {
                  $('#progress .bar').show();
                  if ($.browser.msie &amp;&amp; parseInt($.browser.version, 10) &lt; 10) {
                      $('#progress .bar').css({
                          "background" : "url(images/progressbar.gif) no-repeat",
                          "width" : "100%"
                      })
                  } else {
                      $('#progress .bar').css({
                          'background-color' : "#2694E8",
                          'width' : '0%'
                      });
                  }
                  data.formData=$("form").serializeArray();
                  data.submit();
                  $("#fileUploadButton").off("click").addClass("toHide")
  
              })
          },
          change : function(e, data) {
              $.each(data.files, function(index, file) {
  
                  filesCount++;
                  vOutput = "&lt;fieldset class='FileUploadFieldset'&gt;"
                  vOutput += "&lt;legend&gt;" + file.name + "&lt;/legend&gt;"
                  vOutput += "&lt;label&gt;Dateiname:&lt;/label&gt;&lt;input type='text' value='"+file.name+"' name='Dateiname"+filesCount+"' size='50' class='UploadDateiName inputMaske'/&gt;&lt;input type='text' class='toHide originName' name='originName"+filesCount+"' value='"+file.name+"'/&gt;"
                  vOutput += "&lt;label&gt;Dokumentdatum&lt;/label&gt;&lt;input type='text' name='Datum"+filesCount+"' class='UploadDatum inputMaske'&gt;"
                  vOutput += "&lt;label&gt;Berater:&lt;/label&gt;&lt;select name='Berater"+filesCount+"' class='UploadBeraterSelect inputMaske'&gt;&lt;/select&gt;"
                  vOutput += "&lt;fieldset&gt;&lt;legend&gt;Kategorie:&lt;/legend&gt;&lt;div class='UploadKategorie'&gt;&lt;/div&gt;&lt;/fieldset&gt;"
                  vOutput += "&lt;fieldset&gt;&lt;legend&gt;Bemerkung:&lt;/legend&gt;&lt;textarea name='Bemerkung"+filesCount+"' class='UploadBemerkung inputMaske'&gt;&lt;/textarea&gt;&lt;/fieldset&gt;"
                  vOutput += "&lt;input type='button' class='cancelUpload neuButton' value='cancel'/&gt;"
                  vOutput += "&lt;/fieldset&gt;"
                  $("#MappeFilesToUpload").append(vOutput);   
              });
          }
      });
  </code></pre>