Works with any backend npm install Zero dependencies

How-tos

Short recipes for the questions we get most. Every one links to a live demo with complete, copyable code.

Upload very large files reliably

new MultipleUpload('#u', { uploadUrl: '/api/upload', chunked: true,
  chunkSize: 5 * 1024 * 1024, chunkConcurrency: 3, retries: 3 });

Chunks retry individually with exponential backoff; permanent 4xx errors are not retried. Demo

Survive a page reload mid-upload

new MultipleUpload('#u', { uploadUrl: '/api/upload', chunked: true,
  persistState: true, persistAdapter: 'indexeddb', persistBlobs: true });

The queue and file bytes persist in IndexedDB; on return the upload resumes after verifying with the server which chunks it holds. Demo

Upload straight to S3 / Azure / GCS

new MultipleUpload('#u', { uploadUrl: '/api/upload', strategy: 's3',
  chunkSize: 8 * 1024 * 1024 });   // your server signs; browser PUTs the parts

Credentials never reach the browser — a small signing endpoint returns short-lived URLs. S3 · Azure · GCS

Attach uploads to a normal form post

new MultipleUpload('#u', { uploadUrl: '/api/upload',
  hiddenFieldId: 'FileGuids' });   // completed GUIDs land in the hidden input

Files upload while the user types; the form submits references, not bytes. Demo

Send an auth token with every request

new MultipleUpload('#u', { uploadUrl: '/api/upload',
  headers: () => ({ Authorization: 'Bearer ' + getToken() }) });

A function is re-evaluated per request, so short-lived tokens stay fresh across a long upload.

Let users crop before uploading

new MultipleUpload('#u', { uploadUrl: '/api/upload',
  crop: true, cropAspectRatio: 1 });   // editor opens per image

Content-aware crop suggestions, annotate/redact, watermark and AVIF/WebP output are in the same editor. Demo

Validate properly (not just extensions)

new MultipleUpload('#u', { uploadUrl: '/api/upload',
  allowedExtensions: '.jpg,.png,.pdf', maxFileSize: 20 * 1024 * 1024,
  validateMimeByMagic: true });   // magic-byte sniffing

And validate again on the server — client checks are UX, not security. Demo