Storage
Store and download files. Use env.storage from your worker, or hand out signed URLs so the browser transfers files directly.
Your worker has env.storage from the first deploy.
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 10 GiB of storage; Pro includes 100 GiB.
In this section
Getting started
- env.storage — the six APIs
- put, get, list
- Signed URLs
Operating