ccd0 / 4chan-x

Adds various features to anonymous imageboards.
https://www.4chan-x.net/
Other
980 stars 133 forks source link

Added fix for Cloudflare image compression with quickdownload button. #3448

Open ClawhammerLobotomy opened 7 months ago

ClawhammerLobotomy commented 7 months ago

For issue #3446

bakugo commented 7 months ago

This doesn't fully fix the issue, it will work the first time you click it since the URL will not be in cloudflare's cache, but any subsequent clicks will still download the compressed image, and if anyone near you already downloaded the image using 4chan X, it might already be in the cache the first time you click. The query part should be random every time to guarantee it's not cached.

ClawhammerLobotomy commented 7 months ago

That makes sense. I apparently did not understand the full scope of the problem.

I've updated this using a random string based on the current timestamp and a random number. Seems to be working when downloading the same image multiple times for me.