> > Feature

clear removed files from server (as function for admins)


Feb 1, 2006
10 hours ... 2 days
Feb 1, 2006 / pixtur
Aug 23, 2009 / clawfrown

Attached files

No files uploaded
For an introduction how file-uploads work read: http://wiki.pixtur.de/index.php/File_uploads

Currently there is no way to remove files from the server. The items are just marked as deleted:


Which does something like:

 $item->state = -1

The item is not(!) been removed from the database and it could be restored everytime. This leeds to the problem, that old files might collect in the _files/ directory and we need a function to go through all files like.

 $files= File::getFiles(array(
   'state' => STATE_DELETED,
   'view_all' => true,

First this request-type has to be added to the getFiles()-function (see db/class_file.inc). Another (slower) way of doing this might be:

  if($files= File::getAll(array(
    'view_all'=> true,
  ))) {
    foreach($files as $f) {
       if($f->state =-1) {
We need a function which is only be accessible for admins (see ) to place this function into the interface.



10 years ago

I'd like to see this feature in.

We sometimes use the file facility in Streber for temporary files; when files are no longer needed, they just steal disk and backup space for us.


10 years ago

I think be able to remove files marked as deleted is a good thing. For example, during the life of a project I want to keep everything there regardless if it was deleted or not, this way I can roll back if I need to and look at what was done to get to the final version of say a graphic or a document or task and topics for that matter, but when the project is over, I really don't need it any longer as I package the solution and ship it to the customer and off onto the next project...

Just my two cents for what it is worth...


9 years ago (4. update 9 years ago)

I believe this is essential.

We have been using redmine in production environment for a long time. And I must say we use files very extensively. Some of our files are up to 100Mb each and sometimes people do mistakes and upload wrong files. I am really afraid of what will happen when there is around 10Gb+ of trash on the server and there is no possibility to empty that.

Guys, I believe you get the wiki idea about "everything could be undone" too straight. Files are not wiki! Especially big files. (Ask those guys who develop operational systems..)
For files there always has to be "Empty trash bin" button.

PS. I do love Streber, but this situation with files actually prevents me of using it.. :-(