Next.js getPlatformProxy R2 binding not uploading to bucket?

When using the getPlatformProxy in Next.js via the @cloudflare/next-on-pages/next-dev monkey patch, calls to upload a file to my bound R2 bucket do not upload files to the actual bucket. Is this expected behavior or do I have a configuration error?
const result = await getRequestContext().env.BUCKET_NAME.put(key, buffer)
const result = await getRequestContext().env.BUCKET_NAME.put(key, buffer)
printing result, all fields of the object are undefined. The .wrangler directory does cache the upload in one of its subdirectories, however.
2 Replies
Hello, I’m Allie!
Uploads in local dev are not pushed to your actual R2 bucket, if that is what you mean?
stillmotion
stillmotionOP9mo ago
Yeah that answers my question. Would be nice to emulate it, however. Seems like I’ll need to proxy to the aws api for development
Want results from more Discord servers?
Add your server