Introduction
@dimah-s3/react headless hooks for S3 upload, download, and delete.
@dimah-s3/react provides headless React hooks for upload, download, and delete. You build the UI; hooks handle state, progress, retry, cancel, and multipart.
This package handles presign-based client flows only. For list, copy, tagging, and other S3 APIs, use @aws-sdk/client-s3 in your backend.
Presign-first: the browser never holds long-lived credentials. Hooks call your API for a presigned URL, then transfer bytes directly to S3 with progress and cancellation.
Custom backend
Same model as @uppy/aws-s3: your server presigns, hooks run in the client. Use Custom backend to wire your own API — @dimah-s3/server is optional.
Why @dimah-s3/react
- Headless — your markup; hooks own state, progress, retry, and cancel
- Full client flows — multipart upload, download, and delete in one API
- Production UX out of the box — progress, retry, cancel, and safe two-step delete
- Any backend — works with your own presign API; server package is optional
- Easy UI composition — pair with shadcn components or build custom controls
Documentation
Setup
Upload-first setup: S3Api client, provider, and first upload button.
Upload store
Resumable multipart uploads with localStorage, memory, or custom stores.
Helpers
Progress formatting, validateFile, formatFileSize, and more.
Custom backend
S3Api contract — request and response types.
Upload
useUploadControls and useMultiUploadControls.
Download
useDownload and useFetchDownload.
Delete
useDelete two-step confirmation flow.
UI
shadcn components built on these hooks.