When running cleanup_database.pl with --temp-uploads it should delete the associated file from the server when it clears the record from the uploaded_files table in the database. This works as expected in main/upstream. It does not appear to work in 24.05.x Severity = normal because this could cause the disk to fill up and break uploads of all types including staging MARC files. To reproduce: 1. Check out origin/main 2. Go to Tools -> Upload and upload a temporary file (not using an upload category) 3. In your KTD, look at the files in /var/lib/koha/kohadev/tmp/koha_kohadev_upload/ and notice your upload is there 4. Run cleanup_database.pl like koha-foreach --chdir --enabled /usr/share/koha/bin/cronjobs/cleanup_database.pl --confirm --temp-uploads --verbose 5. Confirm your uploaded file is gone from the Uploads interface in Koha, and from /var/lib/koha/kohadev/tmp/koha_kohadev_upload/ 6. Repeat the above plan with 24.05.x checked out and notice the file is still in /var/lib/koha/kohadev/tmp/koha_kohadev_upload/
I think maybe this actually does work ... not sure what I was doing wrong yesterday!