Skip to content

[C2] Clean uploaded temp files #5601

@ywarnier

Description

@ywarnier

Files are now uploaded asynchronously, but this means if many files are uploaded and some are then removed from the list before submitting the form, the deleted files will remain in a temporary folder until deletion by a later process.
To avoid this, a process of cleaning (possibly together with cache) should be offered through the admin interface and as a cron task.

Steps to implement:

  • locate the directory holding the files temporarily until they are moved to their final destination (let's say we call that $tempUploadFolder)
  • on /main/admin/archive_cleanup.php, make sure when you click "Proceed with cleanup", the $tempUploadFolder is emptied of all files
  • in php bin/console cache:clear, add an option to clear the temporary upload folder (--upload-folder) or create a new command cache:clear-uploads, so that it can easily be "chroned" later on

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions