diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-13 12:07:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-13 12:07:19 +0000 |
commit | c99b638d61cc5dd6b9ffcf4212dfaca1973f7500 (patch) | |
tree | 13f809bad3d9ce0c8583b857d5030b55c54bb1f1 /lib/tasks | |
parent | d0bbaef308ae6183445a8697b08f8eae5ed9ccf8 (diff) | |
download | redmine-c99b638d61cc5dd6b9ffcf4212dfaca1973f7500.tar.gz redmine-c99b638d61cc5dd6b9ffcf4212dfaca1973f7500.zip |
Store attachments in subdirectories (#5298).
Existing files can be moved to their target subdirectories using rake redmine:attachments:move_to_subdirectories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10990 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/redmine.rake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake index 01a4e6227..1ecf507ba 100644 --- a/lib/tasks/redmine.rake +++ b/lib/tasks/redmine.rake @@ -21,6 +21,11 @@ namespace :redmine do task :prune => :environment do Attachment.prune end + + desc 'Moves attachments stored at the root of the file directory (ie. created before Redmine 2.3) to their subdirectories' + task :move_to_subdirectories => :environment do + Attachment.move_from_root_to_target_directory + end end namespace :tokens do |