Bypass cache for video files above 512MB only

Hi there, I’ve got about 3000 video files, and half of them are larger than 512MB. I want to use Cloudflare’s cache feature for files smaller than 512MB. How can I make the cache automatically bypassed for files bigger than 512MB?

Because when just I turn on the cache feature, the larger videos (512MB+) often have trouble playing or skipping ahead at certain points.

Files above 512MB are not cached by Cloudflare:

Apart from that, you aren’t supposed to use Cloudflare for video files anyway, which is probably why you are having problems with these files:

You should put your videos on a subdomain that does not use Cloudflare’s proxy.

I’m using Cloudflare R2, as far as I know, it is allowed to enable cache

You are correct.

But in that case, files above 512MB are still not cached.

Yea, files above 512MB won’t be cached, but I’m not sure if that’s a bug or not. Sometimes when I try to skip to a specific scene in the video (only on large size videos), it always gives an error and restarts the video from the beginning. Shouldn’t the video still play smoothly even without cache?

That is not a bug. The 512MB cache limit applies, unless you are an Enterprise customer.

Other than that, you’d have to find out why the video player crashes. Does the dev console give any information?