Skip to content

[wrangler] R2-3896 Add R2 local uploads command#11867

Merged
vicb merged 2 commits intocloudflare:mainfrom
rahulsuresh-git:rahulsuresh-git/add-local-uploads-to-wrangler
Jan 30, 2026
Merged

[wrangler] R2-3896 Add R2 local uploads command#11867
vicb merged 2 commits intocloudflare:mainfrom
rahulsuresh-git:rahulsuresh-git/add-local-uploads-to-wrangler

Conversation

@rahulsuresh-git
Copy link
Contributor

@rahulsuresh-git rahulsuresh-git commented Jan 11, 2026

Adds the wrangler r2 bucket local-uploads command to manage local uploads configuration for R2 buckets. When enabled, object data is written to the nearest region first, then asynchronously replicated to the bucket's primary region.

Commands:

  • wrangler r2 bucket local-uploads get - Get current configuration
  • wrangler r2 bucket local-uploads enable - Enable local uploads
  • wrangler r2 bucket local-uploads disable - Disable local uploads

Flags:

  • -y, --force flag to skip confirmation prompt

Uses the R2 API endpoints:

  • GET /accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads
  • PUT /accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads

Testing 14 unit tests covering help output, get/enable/disable flows, confirmation prompts, and error cases

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@rahulsuresh-git rahulsuresh-git requested a review from a team as a code owner January 11, 2026 07:17
@changeset-bot
Copy link

changeset-bot bot commented Jan 11, 2026

🦋 Changeset detected

Latest commit: 332804b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rahulsuresh-git rahulsuresh-git marked this pull request as draft January 11, 2026 07:18
@rahulsuresh-git rahulsuresh-git changed the title feat(workers-sdk): R2-3896 Add R2 local uploads to wrangler [wrangler] R2-3896 Add R2 local uploads to wrangler Jan 11, 2026
@rahulsuresh-git rahulsuresh-git changed the title [wrangler] R2-3896 Add R2 local uploads to wrangler [wrangler] R2-3896 Add R2 local uploads command Jan 11, 2026
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jan 12, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 12, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11867

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11867

miniflare

npm i https://pkg.pr.new/miniflare@11867

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11867

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11867

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11867

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11867

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11867

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11867

wrangler

npm i https://pkg.pr.new/wrangler@11867

commit: 332804b

@rahulsuresh-git
Copy link
Contributor Author

rahulsuresh-git commented Jan 14, 2026

TODO: Remove jurisdiction changes since it is not supported.
Edit: Done

@rahulsuresh-git rahulsuresh-git force-pushed the rahulsuresh-git/add-local-uploads-to-wrangler branch from 47f2947 to af6a5f0 Compare January 26, 2026 06:11
Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few minor comments

@rahulsuresh-git rahulsuresh-git force-pushed the rahulsuresh-git/add-local-uploads-to-wrangler branch from 7ff73b4 to 1590628 Compare January 29, 2026 19:10
@rahulsuresh-git rahulsuresh-git marked this pull request as ready for review January 29, 2026 20:25
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional flags.

Open in Devin Review

@rahulsuresh-git rahulsuresh-git force-pushed the rahulsuresh-git/add-local-uploads-to-wrangler branch from d052092 to cc90142 Compare January 29, 2026 21:56
Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please address my inline comment and we should be good to go after that.

Thanks for your updates

@rahulsuresh-git rahulsuresh-git force-pushed the rahulsuresh-git/add-local-uploads-to-wrangler branch from 2547b42 to bb0c856 Compare January 30, 2026 05:40
@rahulsuresh-git
Copy link
Contributor Author

I have the documentation PR link in description. Not sure why this check fails https://github.com/cloudflare/workers-sdk/actions/runs/21505813162/job/61964620581?pr=11867. Any idea @vicb ?

@vicb
Copy link
Contributor

vicb commented Jan 30, 2026

I have the documentation PR link in description. Not sure why this check fails https://github.com/cloudflare/workers-sdk/actions/runs/21505813162/job/61964620581?pr=11867. Any idea @vicb ?

CI mistery but I can add a label to bypass that, no worry to have here.

Could you please have a look at #11867 (comment)

@rahulsuresh-git rahulsuresh-git force-pushed the rahulsuresh-git/add-local-uploads-to-wrangler branch from f51ae26 to 78d3af0 Compare January 30, 2026 15:28
@vicb vicb added the skip-pr-description-validation Skip validation of the required PR description format label Jan 30, 2026
Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jan 30, 2026
@vicb vicb merged commit 253a85d into cloudflare:main Jan 30, 2026
43 of 46 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jan 30, 2026
petebacondarwin pushed a commit to ksawaneh/workers-sdk that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-pr-description-validation Skip validation of the required PR description format

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants