プロジェクト

全般

プロフィール

Vote #67040

完了

Store attachments in sub directories

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
開始日:
2010/04/13
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
60
issue_org_id:
5298
author_id:
6045
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

To prevent Redmine's storage_path's (by default: @File.join RAILS_ROOT, 'files'@) index growing too large (we have so many file-s there, that accessing to the this directory was getting to become slow).

Files already present in the storage will still available, but the newly uploaded file will be storeg in a subdirectory.

The directory structure: RAILS_ROOT/files/1004/25/100425124312_filname_or_hash.extension.

Happy pathcing :)


journals

Feature added in r10990. Attachments are now stored in subdirectories per month (eg. 2012/12).

A rake task was added to move existing files to their target subdirectories:

rake redmine:attachments:move_to_subdirectories
--------------------------------------------------------------------------------
THANK YOU SO MUCH!

JA IST DENN HEUT SCHON WEIHNACHTEN?

(engl.: is it already christmas eve?)
--------------------------------------------------------------------------------
*Failed to run on my machine, Windows 2012 Server x64*
Bitnami ruby stack v1.9.3-14 installed to C:\BitNami\rubystack-1.9.3-14

Environment:
* Redmine version 2.3.3.stable
* Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32]
* Rails version 3.2.13
* Environment production
* Database adapter Mysql2
Redmine plugins:
* no plugin installed

!system_error.png!

And here is the "Trace file":http://www.redmine.org/attachments/download/10518/trace.txt
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

duplicates,Closed,9908,The /files directory should contain attachments in subdirectories
duplicates,Closed,2228,Multilevel upload dirs to accomodate 1000's of files

Admin Redmine さんが3年以上前に更新

  • カテゴリAttachments_19 にセット
  • 対象バージョン2.3.0_60 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0