데이터
스토리지
파일을 올리고 내려받습니다. env.storage 하나로 쓰고, 서명 URL 로 브라우저에 직접 넘길 수 있습니다.
runlot add storage
runlot deploy이러면 워커에서 env.storage 를 쓸 수 있습니다.
const obj = await env.storage.put("covers/hello.png", file, { contentType: "image/png" });
const url = await env.storage.presign("covers/hello.png", { ttl: 600 });이미지·첨부처럼 큰 이진 데이터는 데이터베이스가 아니라 여기에 두세요. 무료 티어에서 1 GiB 입니다.
이 그룹에서 읽을 것
기본
- env.storage — API 여섯
- put · get · list
- 서명 URL
다루기