explaingit

23/resumable.js

4,734JavaScriptAudience · developerComplexity · 2/5Setup · moderate

TLDR

Resumable.js is a dependency-free JavaScript library that splits large file uploads into chunks and retries failed pieces automatically, so uploads survive network drops without starting over.

Mindmap

mindmap
  root((resumable.js))
    What it does
      Chunked uploads
      Auto-retry failed chunks
      Resume after disconnect
    User features
      Drag and drop
      Browse to select
      Progress tracking
    Configuration
      Chunk size
      Concurrent uploads
      Retry behavior
    Server side
      Receive chunks
      Reassemble file
      Skip existing chunks
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add drag-and-drop file upload to a web page that automatically resumes if the user's connection drops.

USE CASE 2

Upload large video or document files in chunks with progress tracking and automatic retry on failure.

USE CASE 3

Let users close and reopen the browser mid-upload and pick up where they left off using the test-mode chunk handshake.

Tech stack

JavaScriptHTML5 File API

Getting it running

Difficulty · moderate Time to first run · 30min

Requires writing server-side chunk handling and reassembly logic, no library handles the server side for you.

No license information is mentioned in the explanation.

In plain English

Resumable.js is a JavaScript library that makes it possible to upload files to a server in a way that can survive network interruptions. Instead of sending a file as one big transfer, the library splits it into small pieces called chunks. If a chunk fails to upload, the library retries that piece automatically. If your internet connection drops entirely, the upload can pick up where it left off once the connection returns, rather than starting over from scratch. The library works entirely inside the browser using a built-in browser feature called the HTML5 File API. It has no other dependencies, meaning you do not need to install any extra tools or packages to use it. It works in Firefox 4 and later, Chrome 11 and later, Safari 6 and later, and Internet Explorer 10 and later. On the user-facing side, you point the library at a button or a drop area on your web page. Users can then click to browse for files or drag and drop them in. Once a file is added, the library handles everything: splitting, uploading, retrying failed pieces, and tracking overall progress. You can listen for events to know when a file has been added, when it finishes successfully, or when an error occurs. On the server side, you need to write code that receives each chunk and saves it. The library sends extra information alongside each chunk, including the chunk number, total number of chunks, file size, and a unique identifier for that file. Once all chunks arrive, your server code reassembles them into the complete file. The README includes notes on which HTTP status codes the library treats as success, which it treats as a permanent failure, and which it treats as a cue to retry. There is also an optional test mode where the browser asks the server before uploading each chunk whether that chunk already exists. This lets uploads resume even after closing and reopening the browser. Configuration options cover chunk size, number of simultaneous uploads, parameter names sent to the server, and many other details. Sample code is included in the repository.

Copy-paste prompts

Prompt 1
Show me how to add Resumable.js to my HTML page with a drop zone and progress bar that survives page refreshes.
Prompt 2
Help me write Node.js server code to receive Resumable.js chunks, save them, and reassemble the complete file.
Prompt 3
How do I configure Resumable.js chunk size, number of concurrent uploads, and retry behavior for large video files?
Prompt 4
Walk me through the Resumable.js test endpoint so it can skip chunks that were already successfully uploaded on a previous attempt.
Open on GitHub → Explain another repo

← 23 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.