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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-testing-miniflare-r2-workflow-guide.md | Documentation 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
