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
This commit is contained in:
Jean-Philippe Lang
2011-01-23 10:41:43 +00:00
parent 3b28a0e231
commit 7dd464c577
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -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