Upload a blob to storage
The data to upload
Optionalfilename: stringOptional filename hint
Optionalmetadata: Record<string, unknown>Optional metadata for the upload
Upload result with identifier and metadata
Download data from storage
The storage identifier (could be URL, hash, path, or any unique ID)
Optionaloptions: StorageDownloadOptionsOptional download options
The downloaded data as a Blob
OptionallistList stored items (optional)
Optionalprefix: stringOptional prefix to filter results
Optionaloptions: StorageListOptionsOptional listing options
Array of storage items with metadata
OptionaldeleteDelete a stored item (optional)
The storage identifier to delete
Promise that resolves to true if deletion succeeded
OptionalextractExtract identifier from a URL or return as-is (optional) Used for backward compatibility with URL-based systems
The URL to extract from
The extracted identifier
Storage callback functions for flexible storage operations.
Instead of hardcoding storage behavior (HTTP endpoints, etc.), users can provide custom callback functions to handle storage operations in any way they choose. This pattern matches the relayer callbacks approach, providing maximum flexibility.
Example