Download an Object or Stream It to Stdout
r2
// what it does
Fetches an object back out of R2. Use `--file` to write it to a path, or `--pipe` to stream raw bytes to stdout so you can redirect or pipe into another tool. Handy for pulling down a backup or inspecting a stored file.
// shell
$ wrangler r2 object get my-bucket/images/logo.png --file=./logo.png --remote$ wrangler r2 object get my-bucket/report.csv --pipe --remote > report.csv// gotcha
With neither `--file` nor `--pipe`, wrangler writes to a file named after the object key in the current directory. And like put, `get` targets the local simulator unless you add `--remote`.