bayang / jelu

Self hosted read and to-read list book tracker
MIT License
331 stars 13 forks source link

Add cache-buster string to Cover Image filenames #117

Open DarthNerdus opened 5 months ago

DarthNerdus commented 5 months ago

Add a random 8 character string into filename paths when downloading or saving new cover images. This random string will break any caching (browser or especially useful for Cloudflare/proxies) and serve the new image with a different URL.

Backwards compatible as it only applies on save. Current covers will serve with their name until a new image is uploaded instead.

DarthNerdus commented 5 months ago

I didn't write any additional tests as I believe this is appropriately covered with the current suite. Let me know if you feel differently.