Local Provider
Uploads
The local provider exposes upload-zone and upload-client primitives for direct uploads.
Upload features
- drag and drop
- optimistic placeholders
- upload hooks
- completion and failure callbacks
- disabled and readonly-aware behavior
The upload client API
The local client exposes createLocalDriveUploadClient().
That client gives you four operations:
prepareUpload()upload()deleteFiles()updateNode()
Required endpoints
To build the upload client you provide endpoints for:
presignUploadconfirmUploaddeleteNodesupdateNode
Upload lifecycle hooks
Useful hooks include:
beforePresignafterPresignbeforeConfirmafterConfirm
These are good places for:
- analytics
- custom toasts
- attaching additional metadata
- integration with app-specific invalidation logic
Recommended pattern
Use upload callbacks for product-specific work such as analytics, toasts, or asset indexing, but leave the actual upload lifecycle to the provider abstractions.
Important behavior
If the binary upload fails after a presigned node was created, the upload client attempts cleanup by deleting the provisional node. That means your app gets a cleaner failure mode without having to manually remove broken placeholders.