Data
Storage
Store and download files. Use env.storage from your worker, or hand out signed URLs so the browser transfers files directly.
{ "storage": true }runlot deployOnce you deploy, env.storage is available in your worker.
const obj = await env.storage.put("covers/hello.png", file, { contentType: "image/png" });
const url = await env.storage.presign("covers/hello.png", { ttl: 600 });Keep large binary data such as images and attachments in storage, not in your database. The free tier includes 1 GiB of storage.
In this section
Getting started
- env.storage — the six APIs
- put, get, list
- Signed URLs
Operating