I’m using plupload with Asp.Net through a generic handler. I have a fully custom interface so I am just binding javascript. I have coded it to start automatically, but the files upload one at a time. Is there a way to make the files upload in parallel? I assign unique filenames to everything so that isn’t a concern.
var uploader = new plupload.Uploader({
runtimes: 'gears,html5,flash,silverlight,browserplus',
browse_button: 'select-from-folder',
container: 'uploader',
drop_element: 'uploader-drop-element',
max_file_size: '2000mb',
chunk_size: '1mb',
unique_names: true,
url: '/myuploader.ashx?globalId=' + globalId,
flash_swf_url: '/scripts/plupload/plupload.flash.swf',
silverlight_xap_url: '/scripts/plupload/plupload.silverlight.xap',
filters: [
{
title: "Application Supported",
extensions: "jpg,gif,png,pdf,mp4,flv,avi,wmv"
}
]
});
uploader.init();
uploader.bind('Init', function (up, params) {
// removed for brevity
});
uploader.bind('FilesAdded', function (up, files) {
for (var i in files) {
// removed for brevity
}
uploader.start(); // auto-start the uploader
});
uploader.bind('UploadProgress', function (up, file) {
// removed for brevity
});
uploader.bind('FileUploaded', function (up, file, resp) {
if (uploader.total.uploaded >= uploader.files.length) {
// removed for brevity
}
});
After reading through the documentation, it doesn’t look to me like parallel uploads are currently supported, although you could probably modify the source code to do this with some web workers.
The actual uploads occur in the
uploadNext()function (line 897).