Storage service for file storage in queries, mutations, actions, and HTTP actions. Import it from your generated services module:
Every operation returns an Effect. The table lists the value produced when it succeeds.
Get a download URL
Retrieve a blob’s download URL withgetUrl. The result is a URL object, not a string. If the blob doesn’t exist, the effect fails with BlobNotFoundError.
Generate an upload URL
Generate a URL that a client can use to upload a blob.generateUploadUrl is an Effect property, so yield it without parentheses. It produces a URL object.
Delete a blob
Delete a stored blob by its storage ID. If deletion fails, the effect fails withBlobNotFoundError.
Get a blob
Read a stored file directly as aBlob. If the blob doesn’t exist, the effect fails with BlobNotFoundError.
Store a blob
Store aBlob directly and receive its storage ID. Optionally supply a SHA-256 hash in options for Convex to verify.