When updating a file, lets say a PDF file, by replacing it with a new PDF, you can find yourself with both old and current versions of the content. The old one is at
/__data/assets/pdf_file/12345/report.pdf and the new current one is at /__data/assets/pdf_file/12345/new_report.pdf. Note the different file names!
It can be quite dangerous if you think you have removed an old file by replacing it, yet old links to that page (for example from a Google search) are still valid!
Has anyone found a good solution to this problem?
Sounds like a bug to me. I'm sure it used to clean up after itself. Log it and we'll fix it.
I think this only happens when the new file has a different name from the old file. If you replace the file with a new one with the same name, it obviously gets the same URL and thus replaces the existing file.
Yeah, I assumed as much. Once the file determines it is live and public, it copies itself to the data dir, but is obviously not clearing it out first.
I logged this as a bug on 17th May this year…
Bug ID 1370