diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-23 10:41:43 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-23 10:41:43 +0000 |
commit | 7dd464c577bd1b41d80554390b4b8a2ff9372e8b (patch) | |
tree | 0de6c2654f9b5a007acc759d1b8bd8dc52fbdbf2 /app | |
parent | 3b28a0e231c5d1895e7b7297840eda68f75d70d5 (diff) | |
download | redmine-7dd464c577bd1b41d80554390b4b8a2ff9372e8b.tar.gz redmine-7dd464c577bd1b41d80554390b4b8a2ff9372e8b.zip |
Makes the folder for attachments storage configurable in config/configuration.yml (#1236).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4755 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/attachment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 99e461dc8..93a1534e5 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -43,7 +43,7 @@ class Attachment < ActiveRecord::Base "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"} cattr_accessor :storage_path - @@storage_path = "#{RAILS_ROOT}/files" + @@storage_path = Redmine::Configuration['attachments_storage_path'] || "#{RAILS_ROOT}/files" def validate if self.filesize > Setting.attachment_max_size.to_i.kilobytes |