At the start of this month the website build in AsgardCMS went live Hurray!
After all content was filled without to much hassle the maintenance of the content starts.
What did the client do to break it?
Step one: upload a picture. Lets assume the filename is chocolade.jpg
No problems here.
Step two: upload the same picture, because you have forgotten it already exists and you don't like searching. Asgard knows how this works and save the file as chocolade_1.jpg
Still no problems.
Step three: noticing that the file is now double and delete the first one so only chocolade_1.jpg remains in the database.
Step four: upload the file again, maybe it is a new file with the same name, but this is not a problem the file chocolade.jpg will be saved.
Set five: here it goes wrong, upload the file just one more time. The following error occurs:
FileExistsException in Filesystem.php line 401
File already exists at path: public/assets/media/chocolade_1.jpg
As result that the file chocolade_1.jpg is now existing twice in the database. Removing one of them will destroy the file but leaves one record of it in the database.
After explaining the client what went wrong and how to safely use the media module it happened again...
I think there is something going wrong because chocolade_1.jpg already exists and is still saving it as a new record without checking the existence of chocolade_1.jpg. I would expect that the file will saved as chocolade_2.jpg to prevent this issue.
I have Asgard updated to the latest version of v1.
Is it possible to make a solution for this?