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

If it returns it deleted if it throws an

If it returns it deleted if it throws an error it didn’t

Hi all am currently trying to perform a

Hi all, am currently trying to perform a multi file upload using cloudflare workers and R2 but I keep getting this error
EntityTooSmall: Your proposed upload is smaller than the minimum allowed object size.
EntityTooSmall: Your proposed upload is smaller than the minimum allowed object size.
...

I m getting this error for some requests

I'm getting this error for some requests in my Worker that handles a simple file upload: put: We encountered an internal error. Please try again. (10001) . Apparently the R2 put fails for some reason. It's only happening for ~0.02% of requests. Any idea what could be causing that?...

That’s mostly an API for the dashboard

That’s mostly an API for the dashboard, and is undocumented right now because I plan on changing it slightly. If you’re looking for a way to get bucket usage statistics, you might want to look into the GraphQL API instead.

Multipart uploads

Hi, I did a search but was not able to find a proper answer. What is the proper programmatic way to upload large (multi gig) files? I need large video calls uploaded to R2 for AI purposes. I am guessing that if I use Workers, they will timeout (right?)

👋 I know folders are not a thing but

👋 I know folders are not a thing, but still, what would be the best way to delete by prefix? Use case: we will use folders to store "per customer" data, and ideally, we'd like to delete all files from a prefix quickly.

CORS

hey there folks, I'm trying to use Livewire's tmp upload feature and getting a 403 CORS error on the options call. I do have a CORS policy set to my public bucket. Is this supported right now in R2?

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"...