Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
JavaScript file upload libraries send files from a browser to a server or storage service. Large files travel in chunks so that an interrupted upload can resume from the last completed piece. These libraries handle the profile photos, document attachments, and video uploads in web apps.
Popularity
tus-js-client has the most monthly downloads in this comparison, at 12.0M.
import * as tus from 'tus-js-client'
input.addEventListener('change', function (e) {
// Get the selected file from the input element var file = e.target.files[0]
// Create a new tus upload var upload = new tus.Upload(file, {
endpoint: 'http://localhost:1080/files/',
retryDelays: [0, 3000, 5000, 10000, 20000],
metadata: {
filename: file.name,
filetype: file.type,
},
onError: function (error) {
console.log('Failed because: ' + error)
},
onProgress: function (bytesUploaded, bytesTotal) {
var percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2)
console.log(bytesUploaded, bytesTotal, percentage + '%')
},
onSuccess: function () {
console.log('Download %s from %s', upload.file.name, upload.url)
},
})
// Check if there are any previous uploads to continue. upload.findPreviousUploads().then(function (previousUploads) {
// Found previous uploads so we select the first one. if (previousUploads.length) {
upload.resumeFromPreviousUpload(previousUploads[0])
}
// Start the upload upload.start()
})
})
Uppy
Coordinates browser file uploads through a shared state manager and optional interface and transport plugins.
Downloads / mo
8.1M
Stars
31.1K
Last release
6.3.2
License
MIT
Strengths
Adds upload features through plugins.Choose interface and transport plugins around the same upload state.
Continues interrupted transfers with Tus.Add the Tus plugin to resume uploads after a lost connection.
Limitations
Core needs a transport plugin.Install an uploader plugin to transfer files to the server.
Type checks need server validation.Validate uploaded content on the server; browser metadata is only guidance.
import React from "react";
import Uploady from "@rpldy/uploady";
import UploadButton from "@rpldy/upload-button";
const App = () => (<Uploady
destination={{ url: "https://my-server/upload" }}>
<UploadButton/>
</Uploady>);
FAQ
UploadThing uploads files from the browser through presigned URLs that a backend file router requests. Its genUploader function generates a typed upload function that matches that file router.
Uppy is a modular file upload widget that keeps upload state in a core package. Interface plugins and uploader plugins, such as the Tus plugin for resumable transfers, attach to that core.
FilePond turns a file input into an upload interface with configurable server endpoints. It sends large files in chunks and continues a failed transfer from the offset the server expects.
Dropzone adds drag-and-drop file selection, previews, and upload progress to a browser element. It can split a large file into a series of chunked requests.
Add an uploading plugin to the core orchestrator.
The chunking and uploadMultiple settings cannot be used together.
For coding agents
Found your file upload library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.