title: How to remove file from the queue to stop upload before upload starts in blueimp Basic?
body: <p>Here is the thing,</p>
  
  <p>I want cancel button similar to Basic plus UI or jQuery UI in <strong>Basic</strong>. This question might look silly to you. But actually i got confuse from template which blueimp are using in Basic plus UI or jQuery UI to list upload and downloaded file with start, delete and cancel button.  </p>
  
  <p><strong>EDIT 1 here:</strong> Even i can't use that template because i am working in twig template, which has similar syntax which give error if i use.  </p>
  
  <p>I need code to remove file from the queue and to prevent upload before upload start.  </p>
  
  <p>I searched that _cancelHandler is in jquery.fileupload-ui.js but there are lots of function which are making me confuse.  </p>
  
  <p>Please someone help.  </p>
  
  <p>Even i read basic use of plugin in documentation (minimal setup guide) but there is not data to have cancel button.</p>
  
  <p><strong>EDIT 2 here :</strong> I think i missed to tell that i need only single upload button which will upload all the files which are in queue. if any file in the list cancelled then that should not upload.</p>
  
  <p><strong>here is my code</strong> </p>
  
  <pre><code>$(function () {
  
      var cancel_btn = $('&lt;button/&gt;')
      .addClass('btn btn-warning cancel pull-right')
      .html('&lt;i class="icon-ban-circle icon-white"&gt;&lt;/i&gt;&lt;span&gt; Cancel')
      .on('click', function () {
      var $this = $(this),
          data = $this.data();
          $(this).parents('tr').remove();
  
          alert("code to remove from the queue and to prevent upload before upload start");
      });
  
      var delete_btn = $('&lt;button/&gt;')
      .addClass('btn btn-danger cancel pull-right')
      .html('&lt;i class="icon-ban-circle icon-white"&gt;&lt;/i&gt;&lt;span&gt; Delete')
      .on('click', function () {
          alert('code needed to delete file');
      });    
  
      $('#fileupload').fileupload({
          dataType: 'json',
          autoUpload: false,
          add: function (e, data) {
  
              console.log(data);
             // data.context = $('&lt;div/&gt;').appendTo('#files');
              $.each(data.files, function (index, file) {
  
                  var tr = document.createElement('tr');
                  var td1 = document.createElement('td');
                  var td2 = document.createElement('td');
                  var td3 = document.createElement('td');
                  $(td1).append(file.name);
                  $(td2).append(file.size);
                  $(td3).append(cancel_btn.clone(true).data(data));
                  $(tr).append(td1,td2,td3);
                  $('#files_list tbody').append(tr);
  
                  var size = $('#files_list tbody tr').size();
                  if(size &lt; 1 )
                      $('#files_list').addClass('hide');
                  else
                      $('#files_list').removeClass('hide');
              });
  
              $('#submit').click(function (){
                  //data.context = $('&lt;p/&gt;').text('Uploading...').replaceAll($(this));
                  data.submit();
                  $('#files_list tbody').html('');
              });
          },
          done: function (e, data) {
  
              $.each(data.result.files, function (index, file) {
                  var tr = document.createElement('tr');
                  var td1 = document.createElement('td');
                  var td2 = document.createElement('td');
                  var td3 = document.createElement('td');
                  $(td1).append(file.name);
                  $(td2).append(file.size);
                  $(td3).append(delete_btn.clone(true).data(data));
                  $(tr).append(td1,td2,td3);
                  $('#files_list tbody').append(tr);
              });
          },
          fail: function (e, data) {
              //console.log(data.result);
              $.each(data.result.files, function (index, file) {
                  var error = $('&lt;span/&gt;').text(file.error);
                  $(data.context.children()[index])
                      .append('&lt;br&gt;')
                      .append(error);
              });
          },
          progressall: function (e, data) {
              var progress = parseInt(data.loaded / data.total * 100, 10);
              $('#progress .bar').css(
                  'width',
                  progress + '%'
              );
          }        
      });
  });
  </code></pre>