Picture of Lars Halkjær
Re: Deleted asset listed in assets.json file
by Lars Halkjær - Tuesday, 26 November 2019, 3:10 PM
 

I stumbled upon a variation of the above:

An asset file is named "3_4c_2.mp3".

There are 4 uploads of this file, but the 3 first are marked as deleted.

The 4th one's "title" is changed to "3_4c2.mp3". (as this is the name we want in the "assets.json" file, to be consistent with other file names).

But on the next exportm the "title" in the "assets.json" file is still "3_4c_2.mp3"...

When I look in the database "assets" table the 4th one has a "title" of "3_4c2.mp3" - so this is not used for the export, even though this is the one used

Then I noticed something odd: All 4 versions have the same "filename" ("247c3dd4e6e9a9318aafb4645a780252bfb49734.mp3").

Could this be why the wrong "title" is selected (one of the deleted ones)?

As far as I remeber the "filename" is generated from the MD5 of the file.
If the file is the same for all uploads (it could happen - different people uploading the file anew) I would expect the file record to be updated, but it seems that the file (if this is the case) is overwritten and a new "assets" record is created.