What problem does it solve?
Designing, setting up, or refactoring Cloudflare R2 object storage usage in Hono + TypeScript apps running on Cloudflare Workers/Pages involves bucket bindings, upload/download flows, signed URLs, and folder-like organization. This can be intricate and error-prone. This Skill streamlines the integration, ensuring safe and efficient R2 usage.
Core Features & Use Cases
- Automated R2 Binding & Typing: Wire R2 bucket bindings into Hono apps (
c.env.BUCKET) and ensure type-safe access via a shared Env interface.
- Upload & Download Flows: Design and implement secure upload/download/delete flows from Hono routes, handling content types, metadata, and secure key naming.
- Structured Storage Services: Create service modules encapsulating R2 operations, with key naming conventions (e.g.,
users/<userId>/avatars) and optional presigned URL patterns.
Quick Start
Store user uploads in R2 from this Hono API, add endpoints to upload and download files using Cloudflare R2, and organize R2 keys by user/tenant in my Workers app.