Works with any backend npm install Zero dependencies

Concurrent Queue

Upload up to 3 files simultaneously with concurrency: 3. Remaining files wait in the queue until a slot becomes available.

Active: 0  |  Pending: 0  |  Done: 0
var uploader = new MultipleUpload(document.getElementById('demo-concurrent-queue'), {
 uploadUrl: '/api/upload',
 multiple: true,
 concurrency: 3,
 onTaskStart: function() { updateCounts(); },
 onTaskComplete: function() { updateCounts(); },
 onTaskProgress: function() { updateCounts(); }
});

function updateCounts() {
 var tasks = uploader.tasks;
 var active = tasks.filter(function(t) { return t.status === 'uploading'; }).length;
 var pending = tasks.filter(function(t) { return t.status === 'pending'; }).length;
 var done = tasks.filter(function(t) { return t.status === 'completed'; }).length;
 document.getElementById('cc-active').textContent = active;
 document.getElementById('cc-pending').textContent = pending;
 document.getElementById('cc-done').textContent = done;
}