cloudflare workers
local dev
Local Storage Location
When you run the command wrangler dev
, any data related to R2, as well as other resources, is saved in the .wrangler/state
directory within your project folder. This directory is automatically created if it doesn’t exist. The files uploaded during local development are stored in a subdirectory under .wrangler/state
, specifically in a path like .wrangler/state/../r2/Blob
Customizing Storage Location
you can use the --persist-to
flag with the wrangler dev
command. This allows you to specify a different directory for local storage, which can help in organizing your project or separating local development data from other files
Running in compose
mapping state dir to local machine