본문으로 건너뛰기
runlot

CLI

스토리지 사용량을 확인하고, 끄고 다시 켭니다. 파일을 직접 업로드·다운로드하는 CLI 명령은 아직 제공하지 않습니다.

runlot storage [status] [dir]    Check usage and limits (--json prints the raw data)
runlot storage delete [dir]      Remove storage (requires admin)
runlot storage on [dir]          Turn it back on

모든 프로젝트는 처음부터 저장소를 가집니다. runlot storage delete로 끄면 runlot storage on을 실행할 때까지 꺼진 채로 있고, 이후 배포가 다시 켜지 않습니다.

상태 확인

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);
});

이 페이지의 목차