I’m planning to use Cockpit for a small e-commerce site project. I need to know more about how Cockpit works.
For instance, I upload an image (or another type of file : .pdf, .svg, .mp4, …), via the Cockpit backend, in storage/uploads/myfolder/myimage.jpg
Later, I decide to delete this image… will this image be completely deleted from the server, or will it still be present in other Cockpit folders (temporary folder, cache folder, etc.) ?
I’m asking this question because in other backends I’ve already had this behaviour and it caused me some problems (the image was indeed deleted from the server, but as it was still present in the cache folder… it was still possible to access it).
I did some tests and it seems that Cockpit does not have this kind of problem… but I need to be sure.
And as you can see only the assets DB entry (l.244) and its original file (l.247) are removed.
This means that thumbnail versions of the image will not be deleted, but they will also not be shown anymore as the thumbnail function is checking if the requested asset._id is still a valid (and it is not if deleted).
So the answer is:
NO, not all representations (orignal, thumbnail) of this image will be deleted.
YES, the image will not be available anymore in any form (original, thumbnail) via the API.