本文へスキップ
記事初級

Cloudflare R2 で安全にファイルを取得・アップロードする

Cloudflare R2 バケットからのファイル配信とアップロードを安全に行う TypeScript の Worker を作ります。

最終更新
2026年10月12日
元の記事を読む

この紹介文は現在英語版のみです。

R2 stores large amounts of unstructured data without egress fees. This tutorial binds a bucket to a Worker, serves files from it, and adds an upload route that only accepts requests with an Authorization header matching your secret.

What you’ll learn

  • Create an R2 bucket and bind it to a Worker
  • Fetch objects from the bucket
  • Upload securely with an authorization check
  • Deploy

Cloudflare products used

R2, Workers.

Follow the full, step-by-step tutorial in Cloudflare’s documentation.

さらに学ぶ