#1047·server

Application image may not be cleaned up with concurrent uploads

Author: jmattheisCreated Sep 12, 2026Updated Sep 12, 2026
Labelsa:bug

When concurrently uploading new images for the same application, it's possible that the old image isn't deleted correctly.

UploadApplicationImage reads the current app image, saves the new file, deletes the old file, and then updates the database. When two uploads for the same application run concurrently, both read the same old image name and both delete it. Only the last database update will be applied. The file written by the other request stays on disk but is no longer referenced by any application.

Reported privately by @ry2811