4chan-x icon indicating copy to clipboard operation
4chan-x copied to clipboard

Added fix for Cloudflare image compression with quickdownload button.

Open DanSleeman opened this issue 1 year ago • 2 comments

For issue #3446

DanSleeman avatar Feb 17 '24 02:02 DanSleeman

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.

bakugo avatar Feb 17 '24 03:02 bakugo

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.

DanSleeman avatar Feb 17 '24 13:02 DanSleeman