Prerequisites
1. Build a dropzone
getRootProps() already makes the root click- and keyboard-activatable
(Space/Enter opens the file picker) — no separate “Choose files” button is
required unless you want one. Pass noClick/noKeyboard/noDrag to
useMediaDrop() to opt out of any of that. See Core concepts
for the full file model.
2. Add upload
Pass atransport and the hook additionally returns uploadFile/
uploadAll/cancelUpload/cancelAllUploads/retryUpload. Without a
transport, none of this exists on the returned object, and TypeScript
won’t let you call it.
queued to
uploading to done (or error, with a Retry button). See
Upload for the full queue/retry/cancel contract.
Core concepts
File model, store, and drag state
Validation
Restrictions and custom validators
Upload
Queue, concurrency, retry, cancel
useMediaDrop API
Full hook reference