Project

General

Profile

Actions

Feature #2228

closed

Multilevel upload dirs to accomodate 1000's of files

Added by João Ribeiro over 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
2008-11-25
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate

Description

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!

Thanks


Related issues

Is duplicate of Redmine - Feature #5298: Store attachments in sub directoriesClosedJean-Philippe Lang2010-04-13

Actions
Actions #1

Updated by Richard Pecl over 15 years ago

I think better would be structure like:

files/<project_identifier>/files/<version_name>/<file_name>--<time>
or
files/<project_identifier>/files/<version_name>/<file_name>-<version_name>-<time>

and
files/<project_identifier>/issues/<issue_number>/<file_name>-<time>
files/<project_identifier>/wiki/<file_name>-<time>

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:

<project_identifier>
<version_name>
<file_name>
<time>
<issue_number>
<issue_tracker_name>
<wiki_page>
<document_name>
<document_category>
etc.

Keep a great job!

Actions #2

Updated by Jean-Philippe Lang over 15 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.

Actions #3

Updated by Filou Centrinov about 11 years ago

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

Actions #4

Updated by Toshi MARUYAMA about 11 years ago

  • Category set to Attachments
Actions #5

Updated by Toshi MARUYAMA about 11 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.

Actions #6

Updated by Toshi MARUYAMA about 11 years ago

  • Resolution set to Duplicate
Actions

Also available in: Atom PDF