01 / DECISION
When this primitive earns a place
Use R2 for blobs, artifacts, media, exports, and durable objects that do not need relational queries.
02 / ARCHITECTURE
Build the smallest defensible path
Define key prefixes and ownership, set content type and metadata, choose public or signed access, and document retention plus orphan cleanup.
- 01Name the contract
Use R2 for blobs, artifacts, media, exports, and durable objects that do not need relational queries.
- 02Add one primitive
Define key prefixes and ownership, set content type and metadata, choose public or signed access, and document retention plus orphan cleanup.
- 03Capture failure evidence
Upload, retrieve, range-read, and delete a disposable object; verify headers, access denial, retention, and missing-object behavior.
03 / REPRODUCE
Evidence before confidence
Upload, retrieve, range-read, and delete a disposable object; verify headers, access denial, retention, and missing-object behavior.
npx wrangler r2 object put BUCKET/demo.txt --file=demo.txt 04 / BOUNDARY
The production boundary
Public buckets and guessable keys can expose data. Object storage does not automatically provide application authorization or lifecycle intent.
05 / FIRST-PARTY SOURCES
Keep first-party sources authoritative
Product behavior, limits, pricing, and availability can change. Re-check these sources before acting.