For Workes & Pages, what is the name of the domain?
local
What is the error message?
✘ [ERROR] The specified key does not exist.
What is the issue or error you’re encountering
I’m uploading a file using wrangler r2 object put
but I can’t retrieve it using wrangler r2 object get
What steps have you taken to resolve the issue?
I have upload a file using wrangler r2 object put project/test.pdf --file=/Users/me/Downloads/test.pdf --local
and it tells me Creating object "test.pdf" in bucket "project". Upload complete.
But then when I run wrangler r2 object get project/test.pdf
, it tells me ✘ [ERROR] The specified key does not exist.
However when I run the code const listed = await context.env.MY_BUCKET.list(); console.log('Files in bucket:', listed.objects.map(obj => obj.key));
with my wrangler.toml containing [[r2_buckets]] binding = "MY_BUCKET" bucket_name = "project"
it does contain test.pdf
in the lest. So how can I fix this?
Note: I did open up .wrangler/state/v3/r2/miniflare-R2BucketObject/X.sqlite
at some point in an SQLLite editor to change a file’s file name, but that was unrelated and in the past. Perhaps it corrupted something?