I think you can find your answer in the plugin document from here , I am posting the code here:
var jqXHR = $('#fileupload').fileupload('send', {files: filesList}) .error(function (jqXHR, textStatus, errorThrown) { if (errorThrown === 'abort') { alert('File Upload has been canceled'); } }); $('button.cancel').click(function (e) { jqXHR.abort(); });
The above code means downloading files programmatically (in manual mode). In this case, for the fileupload function, the second argument must be an object with an array (or a similar list array) of File or Blob objects as a file property. Therefore, you need to get an array of files before executing on the code:
var filesList = $("#fileupload").get().files;
I'm not sure if I need to convert the FileList to an array, as shown below, but you can try:
var i,files = $("#fileupload").get().files,filesList=[]; for(i=0;i<files.length;i++){ filesList.push(files.item(i)) }
But keep in mind that there are limitations: The file is only supported using IE10 + and other modern browsers.
For more information, I will list some articles here:
Merlin
source share