npx wrangler r2 object put my-assets/logo.png --file ./logo.png
Upload a file to an R2 bucket
Uploads ./logo.png into the bucket as the object key logo.png. The object path is bucket/key, so my-assets/logo.png targets the my-assets bucket. Set --content-type to control the MIME type served to browsers; omit it and R2 guesses from the extension.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.