Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

I have this issue has been going on for

I have this issue has been going on for a week. The file has been uploaded at least up to 2 days ago. Is this normal? Will my payment be not affected?...

Fly.io <> R2

download speed from R2 to fly.io is sad 🤔

CORS :/

hi all - I had a function working yesterday to upload large files to a bucket. Come back today, and I'm getting CORS error. I've checked my CORS settings and my IP is included in the allowed, as well as the R2 API Token is a forever token. Any thoughts?

R2 <> NextJS

I can get the bucket configured to my proccess.env however it says all the objects are empty. Also, the bucket is working on my production build.

A single bucket with sub directories is

A single bucket with sub-directories is probably the right choice TBH. It's going to make managing things a lot simpler (although I might be wrong, I don't know what your setup looks like :D). I was mostly concerned because I've seen people attempt to allocate a bucket per customer, and then distribute auth tokens for each bucket around. There are no real hard limits on the number of buckets an account can have, but generally if you find yourself needing more, it's a good idea to talk to someone first!...

code

I'm following the example but I seem to get nested folders, is this intentional?

R2, S3

Assuming I code this to support R2, and have all the variables in my .env file, would changing them to AWS S3 be all I need to migrate if needed? Also is it possible to trigger events based on R2 uploads?

content length / content type header enforcement on pre-signed urls

You can find it by searching for createPresignedPost. The rule you are looking for is a value you add to the condition array like this: - ["content-length-range", 1024, 1024*1024] to restrict the upload to files between 1ko and 1mo...

Getting CORS errors trying to upload to

Getting CORS errors trying to upload to a presigned url. ```[ { "AllowedOrigins": [ "*"...

Right Multipart uploads should work

Right. Multipart uploads should work, although ListParts comes to mind as something that isn’t supported yet, but should be pretty soon.

Since they lean on ffmpeg allowing you

Since they lean on ffmpeg - allowing you to split by time (6s - 12s segments) is likely to be a straightforward improvement on their side. 6s of 15Mbps 2160p = 11.25MB.

One of the queries that Synology makes

One of the queries that Synology makes results in a NextMarker loop - forever

```

``` 2023/02/20 16:55:05 DEBUG : rclone: Version "v1.53.3-DEV" starting with parameters ["rclone" "copy" "planet.pmtiles" "r2:/protomap" "-P" "--s3-upload-concurrency=3" "-vv"] 2023/02/20 16:55:05 DEBUG : Creating backend with remote "planet.pmtiles" 2023/02/20 16:55:05 DEBUG : Using config file from "/home/alastair/.config/rclone/rclone.conf" 2023/02/20 16:55:05 DEBUG : fs cache: adding new entry for parent of "planet.pmtiles", "/mnt"...

Configure CORS · Cloudflare R2 docs

Hey all, I've just pushed out a release that finally, FINALLY exposes a UI in the dashboard to configure your bucket's CORS policies! You'll find it on your bucket's Settings page. I know this has been a pain point for people who just want to use a public bucket without having to deal with the S3 API. We're eager to hear what people think of it, and if you have ideas for changes/improvements. I'll create a thread for this so we don't lose your suggestions to time Also accompanying this UI is a new docs page about CORS where suggestions are welcome too: https://developers.cloudflare.com/r2/learning/cors...

Hey we tested R2 uploads with same

Hey, we tested R2 uploads with same instance compared to S3 and DO Spaces, R2 seems significantly slower (about 500ms to S3 and DO's 100ms) is there any way to get around this?

Heya I m trying to use pre signed POSTs

Heya, I'm trying to use pre-signed POSTs with R2 to have users directly upload images to my bucket. Thanks to some posts here I have the CORS portion working fine, but when now when I attempt the upload I get back a 400 with Invalid Argument: Authorization. Am I supposed to be putting something in the Authorization header? Appreciate any help, will post the entire request log in a thread

Because as Kian mentioned the SPA does

Because as Kian mentioned the SPA does not have a server so the cors approach would never really work as the 'client' can't really respond (if i got it correctly)

Has there been any R2 releases within

Has there been any R2 releases within the past week that change the SigV4 side? I don't actually think aws4fetch's presigned URLs work anymore.

You can store and serve anything you

You can store and serve anything you want on R2. There are some automatic mitigations in place specifically for video that might hit you so you could message support to try and ensure you wont get hit by that 🤷