R2 <> NextJS
I can get the bucket configured to my proccess.env however it says all the objects are empty. Also, the bucket is working on my production build.
5 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
No the object appears as R2Bucket {},
in the command line.
I can see some options, like
objects: {} inside of it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
okay that's good to know. I've been trying
const obj = await process.env.CRYPTO_NOTIFICATIONS.get('gainers.csv');
which works on my production branch and wasn't working locally, so I tried console logging the process.env.CRYPTO_NOTIFICATIONS
This seems to work when i run the wrangler on the production build
but then this code triggers, so the env avraible is there but the object is null
If i define my bindings in my wrangler.toml
do I have to run the command with --r2=BUCKET
?
and is --local
needed?Unknown User•3y ago
Message Not Public
Sign In & Join Server To View