Date: 2026-08-13 00:22 Summary: Diagnose upload:r2 403 Forbidden as R2 REST auth/account/bucket issue.
[question]
npm run upload:r2 → wrangler put 403 Forbidden on _pages/ar/privacy.html.gz
[try to solve]
Cloudflare’s REST side rejected the R2 write—this is not a script logic bug. Local upload:r2:local is unaffected. On the machine, run wrangler whoami / r2 bucket list, confirm the bucket exists in the correct account; with multiple accounts, logout+login and clear wrangler-account.json. If using CLOUDFLARE_API_TOKEN, Object Read/Write is not enough for wrangler put—need Admin Read & Write, or switch to the S3 API. Handbook §9.1 added; upload script prints the same hint on 403.
[actions]
- Updated
ops/worker-r2-ops.md§9.1 - Updated
scripts/upload-r2-pages.mjs403 hint