cloudflare-r2-upload

Upload local files to a Cloudflare R2 bucket and generate public URLs via a custom domain.

61|1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/Innei/SKILL --skill cloudflare-r2-upload
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-r2-upload
Source: https://github.com/Innei/SKILL/tree/main/skills/infrastructure/cloudflare-r2-upload
Command: npx skills add https://github.com/Innei/SKILL --skill cloudflare-r2-upload

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines uploading local files to a Cloudflare R2 bucket and returns stable public URLs via a bound custom domain, simplifying asset publishing.

Core Features & Use Cases

  • Batched file uploads to R2 with automatic public URL generation via a bound domain.
  • Supports wrangler OAuth sessions or API tokens, with explicit account handling for multi-account setups and post-upload URL verification.
  • Use cases include publishing site assets, images, and media to a public bucket and serving them from a custom domain.

Quick Start

Upload the files in your local assets directory to the specified R2 bucket and verify the resulting public URLs resolve.

Frequently Asked Questions about cloudflare-r2-upload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload local files to Cloudflare R2 and get public URLs?

You can upload local files to a Cloudflare R2 bucket using wrangler with OAuth or an API token, and generate public URLs by binding a custom public domain to the bucket. This process applies to both single-file and batched uploads, including post-upload URL verification.

What do I need to configure before uploading assets to an R2 bucket with wrangler?

To upload assets to an R2 bucket, you need to specify the BUCKET, KEY_PREFIX, and SRC_DIR configurations. You must also bind a PUBLIC_DOMAIN for URL construction, and provide a CLOUDFLARE_ACCOUNT_ID if you are handling multiple Cloudflare accounts.

Does Cloudflare R2 upload work with multiple accounts?

Yes, Cloudflare R2 upload supports multi-account handling. When managing multiple Cloudflare accounts, you are required to explicitly provide your CLOUDFLARE_ACCOUNT_ID alongside the standard wrangler OAuth session or R2_API_KEY for successful asset publishing.

Can I batch upload images to Cloudflare R2 from a local directory?

Yes, you can batch upload images and media from a local source directory to a specified Cloudflare R2 bucket. This workflow automatically generates stable public URLs for the uploaded assets by utilizing a bound custom domain.

Why do my uploaded R2 files need a custom domain binding?

A custom domain binding is needed to produce stable public URLs for your uploaded R2 files. By configuring the PUBLIC_DOMAIN for URL construction, the skill ensures your published site assets are publicly accessible and verifies the resulting URLs resolve correctly.

What is the best way to publish site assets to a public R2 bucket?

The best way to publish site assets to a public R2 bucket is using wrangler to batch upload local files and generate public URLs via a bound custom domain. This approach streamlines asset publishing by supporting OAuth sessions, API tokens, and post-upload URL verification.