runlot
데이터스토리지

CLI

스토리지 사용량을 확인하고 제거합니다. 켜는 것은 runlot.json 의 선언이고, 파일을 직접 업로드·다운로드하는 CLI 명령은 아직 제공하지 않습니다.

runlot storage [status] [dir]    사용량과 제한을 확인합니다(--json은 원본 데이터 출력)
runlot storage delete [dir]      스토리지를 제거합니다(admin 필요)

스토리지 추가

켜는 명령은 없습니다. runlot.json"storage": true를 적고 배포하면 배포가 만듭니다.

runlot.json
{ "storage": true }
runlot deploy

상태 확인

runlot storage status
runlot storage status --json

스토리지 제거

runlot storage delete

이 명령에는 admin 역할이 필요하며 확인 절차를 거칩니다.

현재 제공하지 않는 CLI 기능

ls, cp, rm처럼 파일을 직접 관리하는 명령은 아직 제공하지 않습니다. 현재는 워커에서 env.storage를 사용하거나 서명 URL을 생성해 파일을 관리하세요.

임시 관리 기능이 필요하다면 워커에 관리 경로를 만들고 접근 제어로 조직 관리자만 접근할 수 있게 설정할 수 있습니다.

app.get("/admin/files", async (c) => {
  const who = identity(c.req.raw);
  if (who.orgRole !== "admin") return new Response(null, { status: 403 });
  const page = await c.env.storage.list({ limit: 1000 });
  return Response.json(page.objects);
});

이 페이지의 목차