Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers R2

Configures R2 buckets within a Miniflare testing environment and demonstrates how to manipulate R2 storage using the getR2Bucket method outside of a Worker context.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers R2

Configures R2 buckets within a Miniflare testing environment and demonstrates how to manipulate R2 storage using the getR2Bucket method outside of a Worker context.

When To Use

Use when you need to configure R2 buckets for local Miniflare testing or need to programmatically get and put data in R2 storage from outside a Worker environment.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-testing-miniflare-r2-workflow-guide.mdDocumentation on configuring and manipulating R2 buckets within a Miniflare testing environment.Questions about documentation on configuring and manipulating R2 buckets within a Miniflare testing environment.
examples/workers-testing-miniflare-r2-cloudflare-workers-miniflare-r2-bucket-conf.textA Miniflare configuration object demonstrating how to initialize R2 bucket mocks for local testing.Exact payloads, commands, or snippets shown in A Miniflare configuration object demonstrating how to initialize R2 bucket mocks for local testing.
examples/workers-testing-miniflare-r2-cloudflare-workers-miniflare-r2-storage-set.textA Miniflare configuration example demonstrating how to initialize and interact with an R2 bucket in a local testing environment.Exact payloads, commands, or snippets shown in A Miniflare configuration example demonstrating how to initialize and interact with an R2 bucket in a local testing e...

What This Skill Covers

  • Specify R2 Buckets to add to your environment as follows:
  • Main sections: Buckets, Manipulating Outside Workers.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/testing/miniflare/storage/r2