Upload a Local File to a Bucket
r2
// what it does
Writes a local file to the given object key. Set `--content-type` so the object serves with the right MIME type over a public domain (otherwise browsers may mishandle it). Good for config blobs, assets, and one-off uploads.
// shell
$ wrangler r2 object put my-bucket/images/logo.png --file=./logo.png --content-type=image/png --remote// gotcha
Without `--remote` the object goes to your local dev simulator, not the real bucket. `put` is meant for small files — for large or bulk uploads use rclone or the aws CLI against the S3 API instead.