Local uploads
You can enable Local Uploads on your bucket to improve the performance of upload requests when clients upload data from a different region than your bucket. Local Uploads writes object data to a nearby location, then asynchronously copies it to your bucket. Data is available immediately and remains strongly consistent.
The following sections describe how R2 handles upload requests with and without Local Uploads enabled.
When a client uploads an object to your R2 bucket, the object data must travel from the client to the storage infrastructure of your bucket. This behavior can result in higher latency and lower reliability when your client is in a different region than the bucket. Refer to How R2 works for details.
When you make an upload request (i.e. PutObject and UploadPart) to a bucket with Local Uploads enabled, there are two cases that are handled:
- Client and bucket in same region: R2 follows the normal upload flow where object data is uploaded from the client to the storage infrastructure of your bucket.
- Client and bucket in different regions: Object data is written to storage near the client, then asynchronously replicated to your bucket. The object is immediately accessible and remains durable during the process.
Local uploads are built for workloads that receive a lot of uploads originating from different geographic regions than where your bucket is located. This feature is ideal when:
- Your users are globally distributed
- Upload performance and reliability is critical to your application
- You want to optimize write performance without changing your bucket's primary location
To understand the geographic distribution of where your read and write requests are initiated:
-
Log in to the Cloudflare dashboard, and go to R2 Overview.
Go to Overview -
Select your bucket.
-
Select Metrics and view the Request Distribution chart.
When local uploads is enabled, uploaded data may temporarily reside near the client before replication completes.
If your workload requires immediate read after write, consider where your read requests originate. Reads from the uploader's region will be fast, while reads from near the bucket's region may experience cross-region latency until replication completes.
Local uploads are not supported for buckets with jurisdictional restrictions, because it requires temporarily routing data through locations outside the bucket’s region.
When you enable Local Uploads, existing uploads will complete as expected with no interruption to traffic.
-
Log in to the Cloudflare dashboard, and go to R2 Overview.
Go to Overview -
Select your bucket.
-
Select Settings.
-
Under Local Uploads, select Enable.
Run the following command:
npx wrangler r2 bucket local-uploads enable <BUCKET_NAME>You can disable local uploads at any time. Existing requests made with local uploads will complete replication with no interruption to your traffic.
-
Log in to the Cloudflare dashboard, and go to R2 Overview.
Go to Overview -
Select your bucket.
-
Select Settings.
-
Under Local Uploads, select Disable.
Run the following command:
npx wrangler r2 bucket local-uploads disable <BUCKET_NAME>There is no additional cost to enable local uploads. Upload requests made with this feature enabled incur the standard Class A operation costs, same as upload requests made without local uploads.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2026 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-