🪣 R2 · Cloudflare Workers docs | Latest TMZ Celebrity News & Gossip | Watch TMZ Live Skip to content
Cloudflare Docs

🪣 R2

Buckets

Specify R2 Buckets to add to your environment as follows:

const mf = new Miniflare({
r2Buckets: ["BUCKET1", "BUCKET2"],
});

Manipulating Outside Workers

For testing, it can be useful to put/get data from R2 storage outside a worker. You can do this with the getR2Bucket method:

import { Miniflare } from "miniflare";
const mf = new Miniflare({
modules: true,
script: `
export default {
async fetch(request, env, ctx) {
const object = await env.BUCKET.get("count");
const value = parseInt(await object.text()) + 1;
await env.BUCKET.put("count", value.toString());
return new Response(value.toString());
}
}
`,
r2Buckets: ["BUCKET"],
});
const bucket = await mf.getR2Bucket("BUCKET");
await bucket.put("count", "1");
const res = await mf.dispatchFetch("http://localhost:8787/");
console.log(await res.text()); // 2
console.log(await (await bucket.get("count")).text()); // 2

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.