Works with any backend npm install Zero dependencies

Configurable Chunk Size

Adjust chunk size based on network conditions. Smaller chunks = more overhead but more resilient.

var uploader = new MultipleUpload('#demo', {
 chunked: true,
 chunkSize: 2 * 1024 * 1024
});
// Dynamic update:
uploader.setOptions({ chunkSize: 5 * 1024 * 1024 });

Tuning the slice

chunkSize defaults to 5 MB and accepts a readable string such as '2MB'. Files smaller than one chunk are sent whole, so the setting only affects uploads large enough to be split.

Pick it from the network, not the file

The right size depends on the connection your users are actually on. On flaky mobile, smaller chunks mean a failure costs less and retries succeed sooner. On a fast, stable link, larger chunks cut per-request overhead. If you cannot characterise your users, the default is a reasonable middle and chunkConcurrency is the better knob for throughput.