Upload a file to the storage provider
The file to upload
Optionalfilename: stringOptional custom filename
Promise with storage URL and metadata
Download a file from the storage provider
The storage URL
Promise with file blob
List files from the storage provider
Optionaloptions: StorageListOptionsOptional filtering and pagination
Promise with file list
Delete a file from the storage provider
The storage URL
Promise with success status
Get provider-specific configuration
Provider configuration object
Cloudflare R2 storage provider.
Remarks
Uses R2's S3-compatible API with SigV4 signed
fetchrequests, so the same implementation runs in browsers, Node.js, and Workers without pulling in@aws-sdk/client-s3. Treats blobs as opaque - encryption, access control, and per-tenant prefixing are out of scope and live in higher layers.The SDK exposes R2 as the recommended default backend. Other providers (Pinata, IPFS, Google Drive, Dropbox, CallbackStorage) remain available for teams that need IPFS semantics or user-owned storage.
Example