How can I access R2 buckets binding when binding multiple buckets
Hi I am currently trying to bind 2 R2 buckets to my worker.
When I do it like this it works for one bucket:
However when binding like this I cant access the bindings in the worker:
I have tried accessing the bucket via (this is undefined) or (this is just an Object not a bucket and has no .get(), ...)
What am I doing wrong?
11 Replies
What does your entire
toml
look like? Sometimes there are some really weird inheritance issues...not much there:
Sorry
Sent too fast
ah wait i see it now i think
Try this:
its putting it in vars isnt it?
Yes
hehe thanks for the help
Or if you want to avoid the mess of inheritance of TOML, take
wrangler.json
out for a spin!will do!
Just convert the above to JSON, and then use the
-j
flag to make sure wrangler
picks it up(i.e. wrangler dev -j
).