Container + R2 + Worker workflow is not
Container + R2 + Worker workflow is not ideal: I am using a separate container service to upload a PDF with a QR code to a remote R2 using the S3 API. My Worker accesses the uploaded PDF from R2 and emails it to the user. This works fine in staging and production but not in development, since the Worker uses a local R2 instance instead of the remote one. I can't use
wrangler dev --remote
because I use Durable Objects, Workflows, and Queues. Is there any workaround for this?2 Replies
Sounds like remote bindings would work for you - you can make just the r2 bucket remote in dev: https://developers.cloudflare.com/workers/development-testing/#remote-bindings
thank you that worked!