Testing R2 from Pages

I'm running my Cloudflare Pages app locally using wrangler pages dev I have R2 instances for preview and production, but locally in dev it uses a version that wrangler is running in the .wrangler/state/v3/r2 folder. However, the other part of my app runs on a container, and I need to get hold of the R2 files on there to test functionality before deploying. I don't want to have to deploy my whole architecture to test it, so it'd be great if I could get my Pages app to talk to the preview remote R2 I noticed that wrangler dev has a --remote option, but Pages doesn't Any ideas how I get around this?
2 Replies
Cyb3r-Jak3
Cyb3r-Jak38mo ago
You can add files to the local R2 bucket using wrangler but remote isn’t supported with pages.
stukennedy
stukennedy8mo ago
finding it quite frustrating all the differences between Workers and Pages, I'm running a Queue, which is called from Pages, but you can only have a Queue consumer in a Worker. There's dev support for Queues in Workers but not in Pages ... so the whole feature is impossible to test. Wasted hours trying to figure out what I was doing wrong. The toml file is an utter disaster too ... there's literally no spec on it anywhere, just isolated examples of use-cases. And again, it's only used by Workers. Trying to figure out how to get the different environments to work both locally, in production and on preview when you're using Workers and Pages is horrific.