Drag and drop folder upload in JavaScript and TypeScript, with chunked and resumable uploads, pause and resume, retry and a persistent error list. Works on phones.
AnyDrop is a front-end upload library that treats folders as first-class objects. It is configured with plain options and events, and has a folder picker and tree view, chunked uploads, pause and resume, a persistent error list, and a layout that works on phones. Packages: @vedratech/anydrop-ui and @vedratech/anydrop-core, with wrappers for React and Next.js and Angular. Badges show the UI package; the badges of the core package are in its README.
Documentation: https://vedratech.github.io/anydrop/
| Get started | Guide: install, quick start, folders, chunking, resume, offline, errors |
| React and Next.js, Angular | Frameworks: components, event props and outputs, custom rows, SSR |
| Live demo | The real UI, with a simulated network |
| API reference | Every option, method, event, error code and type |
| Backend | The HTTP contract, with Express, Laravel, Python (FastAPI) and Java (Spring Boot) examples |
Use it when users upload whole folders, when files are large or the connection is unreliable, or when people use phones.
- Folder tree, empty folders and a folder manifest for the backend.
- Chunked uploads with retry on by default.
- Pause and resume (everything, a folder or one file), also after a page reload (IndexedDB).
- Automatic handling of offline and unreachable servers.
- A persistent error list with retry and export.
- A headless core without a UI.
Uppy and FilePond have plugin ecosystems that AnyDrop does not. If you only need plain file uploads, one of them may suit you better. Sizes are in the Size section.
Guides for common tasks: upload a folder in JavaScript, chunked and resumable uploads, upload large files, pause and resume uploads, uploads that survive a lost connection, folder upload with React, Angular or Vue, Chunked upload backend (Express, Laravel, Python, Java).
@vedratech/anydrop-core: the headless engine (no dependencies, no DOM rendering).@vedratech/anydrop-ui: the plain-JavaScript drop zone, folder tree and mobile layout on top of it.
AnyDrop is frontend only and ships no server: your backend implements a small HTTP contract.
npm install @vedratech/anydrop-ui @vedratech/anydrop-core # drop zone and UI
npm install @vedratech/anydrop-core # headless engine onlyFrom a CDN (pin the minor version). The UI build includes the core and sets window.AnyDrop:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@vedratech/anydrop-ui@0.1/dist/style.css" />
<script src="https://cdn.jsdelivr.net/npm/@vedratech/anydrop-ui@0.1"></script><div id="uploader"></div>import { AnyDrop } from '@vedratech/anydrop-ui';
import '@vedratech/anydrop-ui/style.css';
const ad = new AnyDrop('#uploader', {
url: '/upload',
chunking: true,
chunkSize: 5 * 1024 * 1024,
sendManifest: true, // send the folder structure, including empty folders
manifestUrl: '/upload/manifest',
});
ad.on('queuecomplete', () => console.log('done', ad.getErrors()));Headless, with your own drop area (<div id="upload-area">):
import { AnyDropCore } from '@vedratech/anydrop-core';
const core = new AnyDropCore({
url: '/upload',
chunking: true,
sendManifest: true,
manifestUrl: '/upload/manifest',
});
const area = document.querySelector('#upload-area');
area.addEventListener('dragover', (e) => e.preventDefault());
area.addEventListener('drop', (e) => {
e.preventDefault();
core.drop(e); // call synchronously: the browser clears the dropped items afterwards
});Official wrappers for React and Next.js and for Angular. They need @vedratech/anydrop-ui and @vedratech/anydrop-core next to them.
// React and Next.js (@vedratech/anydrop-react)
import { AnyDrop } from '@vedratech/anydrop-react';
<AnyDrop url="/upload" options={{ chunking: true }} onQueuecomplete={() => console.log('done')} />;<!-- Angular (@vedratech/anydrop-angular), standalone component -->
<any-drop url="/upload" [options]="{ chunking: true }" (queuecomplete)="done()" />Both give you an event prop or output for every event, custom rows written as real components, and a headless hook or service. Guides: React and Next.js, Angular.
- Drag and drop of files and folders together, folder and file pickers, paste. Empty folders are kept, and the backend can receive the structure as a manifest.
- Chunked uploads with retry with backoff, and
Blob.slice()so a file is never loaded into memory whole. - Pause and resume for everything, a folder or one file, and resume after a reload (IndexedDB).
- Bad connections handled: uploads pause by themselves when the browser is offline, the tab is hidden or the server cannot be reached, and carry on when it returns.
- A persistent error list with a reason per file, retry of failed files only, and JSON or CSV export.
- Folder events next to the file events. Mobile friendly, accessible, dark mode, every text translatable.
- ESM, CJS and IIFE builds, TypeScript types, and a pluggable
transportfor S3, tus or fetch adapters.
Download size, measured the same way for every library (minified and gzipped with esbuild, 1 kB = 1024 bytes, measured 2026-11-08): AnyDrop ui + core 34.7 kB, FilePond 4.32.12 (core, no plugins) 40.5 kB, Uppy core + dashboard + xhr-upload 78.4 kB (CSS excluded). AnyDrop with the UI is less than half the size of Uppy with Dashboard. Method and the CSS numbers: size comparison.
Chrome, Edge, Firefox and Safari (desktop), Safari on iOS and iPadOS, Chrome on Android. Safari on iOS has no folder picker and no folder drop, and AnyDrop says so instead of failing. See Mobile and iOS for the table and the iOS limits.
Your server implements four endpoints: POST /upload (a chunk or a whole file), GET /upload/status, POST /upload/manifest and POST /upload/finalize. Full contract: protocol. Working examples: Express, Laravel, Python (FastAPI) and Java (Spring Boot).
pnpm install
pnpm build && pnpm test && pnpm lint && pnpm typecheck && pnpm size
pnpm docs:dev # the documentation website with hot reload
pnpm docs:build # builds the packages, the API reference and the siteCreated and maintained by Vedra Tech (@vedratech).
MIT © 2026 Vedra Tech.
