Parallel Chunks
Upload multiple chunks in parallel with concurrency: 3 to maximize bandwidth utilization for large files.
new MultipleUpload(document.getElementById('demo-parallel-chunks'), {
uploadUrl: '/api/upload',
multiple: true,
chunked: true,
chunkSize: 2 * 1024 * 1024, // 2 MB chunks
concurrency: 3,
onTaskProgress: function(task) {
console.log(task.fileName + ': ' + Math.round(task.progress) + '%');
}
});
Chunks of one file, in flight together
chunkConcurrency defaults to 1, meaning chunks of a single file are sent strictly in order. Raising it sends several at once, which is where the throughput on a fast connection actually comes from — one request rarely saturates the link on its own.
Two different concurrencies
This is not concurrency. That one controls how many FILES upload at the same time; this controls how many CHUNKS of one file do. They multiply: concurrency: 3 with chunkConcurrency: 4 is up to twelve requests in flight, which is more than a browser will run per host and more than most servers enjoy. Raise one or the other, and measure rather than guess.
parallelChunks is the legacy alias, and it is applied only when chunkConcurrency is absent.