-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Problem
Currently image files that were uploaded inside the settings (e.g. favicon, logo, bbb logo) are not always deleted if they are not needed anymore (e.g. when the favicon is exchanged with a new one)
This can result in a lot of image files not beeing deleted if they are exchanged often.
To Reproduce
Steps to reproduce the behavior:
- Upload a new favicon file
- Check storage to see file
- Change favicon setting again
- See previous favicon file not being deleted
Expected behavior
Image files should be deleted if they are not needed anymore.
Additional context
Deleting the files can sometimes be difficult because it can be hard to determine which image files should be deleted and which image files are still needed / currently in use (randomised filename, link instead of file, ...)
Possible solution
Several possible solutions where discussed for this.
The most promising solution discussed was saving the image files with a fixed name (e.g. favicon.) and extending this filename with a random string when loading the file inside the blade view.
Even though this solution was the most promising solution discussed it contains several problems that would need to be fixed when implementing this. (Those are mostly also present whis other possible solutions)
Some of these problems are:
- Defining when the file should be deleted and when not (easiest approach would be to only delete if a new file was provided (image file would not be deleted if a new favicon is provided via a link))
- Migration from current behaviour to new one