🐛 BUG: wrangler r2 object CLI
See original GitHub issueWhat version of Wrangler
are you using?
2.5.0
What operating system are you using?
Mac
Describe the Bug
To reproduce:
- Create a new r2 bucket called
foobar
- Create a README.md
- Attempt to upload the README.md file to
foobar
with the following command:wrangler r2 object put foobar/README.md -f ./README.md
❯ wrangler r2 object put foobar/README.md -f ./README.md
⛅️ wrangler 2.5.0
-------------------
Creating object "README.md" in bucket "foobar".
✘ [ERROR] Failed to fetch /accounts/<account id>/r2/buckets/foobar/objects/README.md - 404: Not Found);
If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose
Running this command outputs the following error:
Now I don’t think this is a bug and is likely PEBKAC. Hopefully, someone can point me in the right direction, and I’ll close this issue. But this is not the only time I’ve been frustrated by the Cloudflare developer experience. All that I want to do is copy a file from my local system to R2. The cli wasn’t intuitive enough for me to guess–I assumed it would be similar to the cp
command–but the -h
was well done. After trying many variations of this command and still receiving similar errors, I gave up and went to the docs. I’m not using workers in any capacity, but I have to go to the workers help to get any information on wrangler, a little confusing, but maybe I’m an outlier here. I get to the commands section and see r2 bucket
documentation. But nothing for r2 object
. I am, again, frustrated. I try the official R2 documentation, also a little confusing going to multiple product pages. No examples using wrangler, just 3rd party libs. Hence, filing this bug.
I love what y’all are doing, and I like the direction Cloudflare is heading with its developer-focused products. Still, I’ve encountered many paper cuts, primarily in the fragmented documentation across multiple product umbrellas. I consider pages, workers, r2, images etc., all to be bleeding-edge products, and I constantly advocate for their use over more traditional software development patterns, but these issues make that more difficult.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hi @lucasnad27, I’m so sorry you experienced this issue.
We’ll update the wrangler command docs to document the
wrangler r2 object
commands, and I’ve raised with the team whether it still makes sense to keepWrangler
underneathWorkers
in the docs.@lucasnad27 I’ll make a PR into https://github.com/cloudflare/cloudflare-docs resolving the issue, which will automatically close this issue and the one I just filed in that repo (https://github.com/cloudflare/cloudflare-docs/issues/6894)