Local R2 Bucket Error
# workers-help
d
I am trying to use a local R2 bucket for localhost development. But this toml entry: [[r2_buckets]] binding = 'testBucket' bucket_name = 'testBucket' is giving me this error message: X [ERROR] In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create " and add its name as preview_bucket_name to the r2_buckets "testBucket" in your wrangler.toml
j
Are you using
--local
? Add
preview_bucket_name = 'testBucket'
to your config there
The idea is that you can use
wrangler dev
and "real" buckets (non-local), so the
bucket_name
and
preview_bucket_name
are separate
d
thank you. that appears to have worked
i was using --local, but i didn't have preview_bucket_name defined