Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
26 views

I'm trying to rename an object in an S3-compatible storage by copying it to a new key and then deleting the old one in Cloudflare R2. I'm using AWSSDK.S3 (4.0.13.1) private (bool success, string ...
mohammadhasan banimoghadam's user avatar
0 votes
0 answers
62 views

It's my first time using CDNs, and I went with Cloudflare R2 / S3 to upload and serve assets. I managed to upload an image to the path users/123456789/avatar-251011-103221008, this path is what I'm ...
Marya's user avatar
  • 198
0 votes
1 answer
46 views

I am trying to make PUT-request to r2.cloudflarestorage.com to upload a file like this: curl --location --request PUT 'https://*.r2.cloudflarestorage.com/***' \ --header 'Content-Type: application/...
cora32's user avatar
  • 400
0 votes
0 answers
73 views

Using software.amazon.awssdk:s3:2.32.11 I started with the following code: var objectKey = "test.txt"; var path = Path.of("/tmp/test/log.txt"); var credentials = ...
justis's user avatar
  • 631
0 votes
1 answer
124 views

I'm trying to use Cloudflare R2 for my .NET project with AWSSDK.S3 but I'm facing a problem: The request signature we calculated does not match the signature you provided. Check your secret access ...
Nouralddin Abdullah's user avatar
1 vote
0 answers
80 views

I'm developing a platform for users to upload and play audio. It's built in NextJS and uses Cloudflare R2 to handle the file storage. My R2 files are served to the client via a NextJS endpoint (/...
MadCreativity's user avatar
0 votes
0 answers
160 views

I have a problem about fixing 401 Unauthorized issue when I upload a file through Cloudflare R2 Storage in my Spring Boot example. I get Token value, access key, secret key and jurisdiction-specific ...
Sercan Noyan Germiyanoğlu's user avatar
1 vote
1 answer
325 views

I am porting a React SPA from a traditional nginx host to a Cloudflare worker, using the recently announced Vite Cloudflare plugin. This SPA needs to retrieve images and PDFs from R2. I have the image ...
Omortis's user avatar
  • 1,580
0 votes
0 answers
45 views

First of all: I have a R2 bucket on cloudflare that is public, allows any origins and any headers, and works completely fine. I'm using django-storages to storage and retrieve static files from that ...
Douglas Florindo's user avatar
0 votes
0 answers
88 views

Why does fs.exists() sometimes return True even after deleting directories using fsspec/s3fs? Is there a reliable way to confirm directory deletion on Cloudflare R2 in python? If I rclone lsf r2://...
Sam Shleifer's user avatar
  • 1,936
0 votes
0 answers
17 views

I use R2 with presigned url and want to know how can I check for extension like only allow image extension and no pdf etc. nodejs: app.post('/pre', async (req, res) => { try { const key = ...
wepro01's user avatar
  • 41
0 votes
1 answer
438 views

I'm getting a pre signed url from my backend ( that uses amazon sdk to generate this ) After getting the pre signed url in the react client ( localhost:3000 ), the next step is to use this pre signed ...
Angel's user avatar
  • 1
1 vote
2 answers
763 views

I have the following code (almost the same as this docs page): private static AmazonS3Client GetS3Client() { var credentials = new BasicAWSCredentials(accessKey, secretKey); return new ...
SpicyCatGames's user avatar
0 votes
0 answers
32 views

I'm experiencing an unusual behavior with the DeleteObjectCommand in the AWS SDK for JavaScript (v3) when interacting with R2. When I call DeleteObjectCommand, it consistently returns a 204 status ...
Trikoo's user avatar
  • 1
1 vote
1 answer
245 views

I am trying to upsert a vector in my cloudflare vectorize index For now I am testing from my terminal using cURL Call I am making is this: curl -v --request POST --url https://api.cloudflare.com/...
Shakil Ahmed's user avatar
1 vote
1 answer
692 views

I am trying to use the AWS SDK for the Cloudflare R2. Here are my constructor codes and logs still I get the signature problem for POST requests. I also can't able to GET any of my buckets. "...
user28412839's user avatar
-2 votes
1 answer
212 views

I saw this tweet from @samgoodwin89 last week: Cloudflare has no egress fees and AWS has no ingress fees. Pay egress fees once to move data to R2 and now you can migrate data to as many AWS regions ...
Cristobal Sarome's user avatar
0 votes
0 answers
90 views

I try to use multipart upload. I already set CORS of the bucket. And do all step based on this Multipart uploads to Cloudlfare R2 + Workers Upload init with reponse below {"msg":"...
ryandra's user avatar
  • 342
0 votes
0 answers
211 views

I have a problem with multipart upload r2 cloudflare. There is 3 steps, upload init, upload part, and upload complete. Upload part code const uploadId = url.searchParams.get('uploadId'); const ...
ryandra's user avatar
  • 342
1 vote
1 answer
367 views

I have a Cloudflare Worker that interacts with an R2 bucket containing several data files. I want to write tests for this, but since Vitest isolates the tests from the development bucket, I need to be ...
decisionmachine's user avatar
0 votes
1 answer
813 views

I am working on Sveltekit app using Typescript and want to display the images from R2, using workers R2 API, in the custom image component. The following is the .svelte code <script lang="ts&...
Agraj Agranayak's user avatar
0 votes
1 answer
129 views

im trying to use CloudFlare R2 to server static files from my django project, but im having "This object could not be viewed". I added custom domains, and allowed public view. I cant ...
Asinox's user avatar
  • 6,873
2 votes
1 answer
659 views

I have a large file deployed to R2, and want some portions of it. Accordingly to MDN, the Range header can specify multiple ranges in the form of Range: bytes=0-10, 20,50. Anyway, when I try to make ...
allevo's user avatar
  • 1,112
1 vote
1 answer
1k views

I'm encountering a CORS error when trying to upload a file using a presigned URL in my React application (using Axios) to CloudFlare R2 storage. The upload works fine in Postman, but the browser ...
Nazir Mudumane's user avatar
0 votes
1 answer
541 views

I'm considering hosting video content on an R2 bucket and want to ensure seamless access to this content across different domains. My plan is to make the R2 bucket's access public and connect it to a ...
GorvGoyl's user avatar
  • 47.2k
1 vote
1 answer
880 views

I want to use CloudFlre R2 as storage for my Flutter app. I have AccessKey, SecertKey and r2Token. Unfortunately, I cannot find a package or HTTP request to upload a file to an R2 bucket. I tried ...
jitendra purohit's user avatar
0 votes
1 answer
1k views

I’m having trouble with setting the correct CORS policy on my bucket on Cloudflare's R2. What I want to achieve: the bucket may by accessed by via any webpage of any domain, but only with GET method ...
user1607016's user avatar
1 vote
1 answer
1k views

I'm developing a Cloudflare Workers application using Hono JS and encountering an issue where I'm unable to access FetchEvent within the Hono context. The application works fine with itty router and ...
scouech's user avatar
  • 109
0 votes
0 answers
703 views

I am looking for how to access the Cloudflare R2 bucket in Postman so i can understand and use it in my way. In other words; i want to know how can i access the r2 bucket and objects using the r2 url ...
Salman Sajid's user avatar
2 votes
1 answer
1k views

I am using Cloudflare R2 with @aws-sdk/client-s3 inside of a serverless function. Here I attempt to add an object to my bucket ('my-bucket'); import { S3Client, PutObjectCommand } from "@aws-sdk/...
12th's user avatar
  • 311
3 votes
3 answers
1k views

Can we set the Cache-Control HTTP response header for our Cloudflare R2 buckets & objects? I could not find options in the web UI nor the AWS CLI "s3" and "s3api" commands. I'm ...
anthumchris's user avatar
  • 9,247
3 votes
2 answers
1k views

I'm trying to move my object between two buckets. I execute a CopyRequest, then a DeleteRequest. But when I'm trying to copy the object, I get the following error: Amazon.S3.AmazonS3Exception: Header ...
Delsx's user avatar
  • 182
2 votes
0 answers
680 views

I'm 90% sure that this is a postman config issue, but I'll give other details in case they matter. I'm testing out Cloudflare's APIs through postman, and I'm just trying to get the list of buckets. I ...
Brian Postow's user avatar
  • 12.3k
3 votes
2 answers
2k views

I'm trying to list objects in a Cloudflare R2 storage bucket using the AWS SDK for JavaScript (v3) in a Node.js application, but I'm encountering an 'Unauthorized' error. Here is the code snippet that ...
trueThari's user avatar
  • 135
3 votes
1 answer
1k views

I want to make a small API, but I could not solve the problem. I created a simple ASP.NET Core Web API project. I'm trying to upload files to cloudflare r2 using AWSSDK but I'm getting an error. Code: ...
fbdev1907's user avatar
  • 128
4 votes
1 answer
1k views

I can't find how to get usage metrics to my R2 bucket through Cloudflare's API. I'd like to get the bucket size and the number of class A and class B operations.
Zoltar1999's user avatar
2 votes
0 answers
1k views

Is there a way to upload a file to Cloudflare R2 storage using boto3 in Python, and get the public URL that it can be accessed at? The files are being uploaded by doing s3 = boto3.resource( "...
gameveloster's user avatar
  • 1,633
2 votes
1 answer
1k views

I'd like to integrate the Cloudflare R2 (object storage) with my Firebase project. Normally you would use Firebase Storage but since Google Cloud has some insanely high egress fees, I'd prefer to use ...
anon's user avatar
  • 29
2 votes
0 answers
369 views

When a user asks for a resource, I redirect them to that resource on cloudflare R2. R2 bucket is behind my own DNS (if that can help or I can change something there). The issue I am facing is a 403 ...
mbenchekroun's user avatar
1 vote
2 answers
5k views

I am trying to replicate the result from this guide: https://developers.cloudflare.com/r2/data-access/s3-api/presigned-urls/ However, with the exact same code, the signedUrl variable return empty ...
harpy's user avatar
  • 11
9 votes
4 answers
9k views

Is there an easy way to delete all objects from a Cloudflare R2 bucket? This isn't something I'd want to do in production, but something that I want to do while testing in development. I'd love to be ...
Phil-6's user avatar
  • 853
1 vote
1 answer
479 views

In my worker I am converting a base64 string I get from the request to a blob with some function. However, when I try to PUT the blob into my bucket, I get "Network Connection Lost" error. I ...
brandon's user avatar
  • 21
4 votes
1 answer
4k views

Cloudflare's R2 has an extension that prevents a NoSuchBucket error, by creating the bucket if it does not exist. To enable it, you're supposed to add a cf-create-bucket-if-missing: true header on the ...
ambiguous58's user avatar
  • 1,421
0 votes
2 answers
3k views

https://hlsbook.net/how-to-serve-hls-video-from-an-s3-bucket/ It is quite simple to setup a bucket folder on S3 to stream a video HLS download. I wonder is cloudflare R2 able to do this? I am able to ...
learncodes123's user avatar
2 votes
1 answer
1k views

I have this handler in my worker: const data = await event.request.formData(); const key = data.get('filename'); const file = data.get('file'); if (typeof key !== 'string' || !file) { return res....
Andy Jessop's user avatar