When doing a programmatic file upload using the jQuery-File-Upload plugin with chunking enabled I can not get more than one file to be sent.
I am making the call as follows:
fileUploadWidget.fileupload('send',
{
files: filesList
})
filesList
is a list of File objects.
Also I have set maxChunkSize and set singleFileUploads to true (I also tried false) as indicated on the Options wiki page.
Has anyone had any success getting this to work?
Update:
I'd made an issue on GitHub for this problem and here's the response from the author:
[...] Chunked uploads only support one file per request. That is, you can still simultaneously upload multiple files in chunks, but you'll have to send mutliple requests for that.
Our Solution:
As has been already commented, and what we ended up doing, was to send the files in a loop where widget
was initialized with sequentialUploads set to true
(you'll want this depending on how your backend is configured):
// for illustration only
// does not do anything with the returned jqXHR objects
for (i = 0; i < files.length; i++) {
widget.fileupload('send', { files: files[i] });
}