Feature #2228

Multilevel upload dirs to accomodate 1000's of files

Added by João Ribeiro almost 13 years ago. Updated over 8 years ago.

Status:ClosedStart date:2008-11-25
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


The directory file has all uploads on the same dir. It would be nice to have two levels of dirs (subdirs) to better organize the files and to have better performance when the list goes beyond a few thousands.

I suggest to use the first two characters of the field "disk_filename", which represent the year, to implement the first level and then the month (next two) to implement the second level.

The are other ways, but it's already a big improvement, IMO.

Good job!


Related issues

Duplicates Redmine - Feature #5298: Store attachments in sub directories Closed 2010-04-13


#1 Updated by Richard Pecl almost 13 years ago

I think better would be structure like:



Most important is the first dir structure since we also need access files on disk directly.

Or the best solution maybe is to allow user freely define 'file-path build macro' using following variables:


Keep a great job!

#2 Updated by Jean-Philippe Lang almost 13 years ago

Richard, project identifier, tracker... shouldn't be used because issues can be moved between projects, trackers... Having to move the files from one directory to another would be insane. And something like: files/issues/issue_number/file_name wouldn't be very efficient (lots of folders with a very small number of files inside).

I would rather use the solution described by João: year/month/file_name where relations are not involved.

#3 Updated by Filou Centrinov over 8 years ago

It's fixed by #5298. Issue can be closed.
Category: Attachments

#4 Updated by Toshi MARUYAMA over 8 years ago

  • Category set to Attachments

#5 Updated by Toshi MARUYAMA over 8 years ago

  • Status changed from New to Closed

Filou Centrinov wrote:

It's fixed by #5298. Issue can be closed.
Category: Attachments

Thank you for your feedback.

#6 Updated by Toshi MARUYAMA over 8 years ago

  • Resolution set to Duplicate

Also available in: Atom PDF