##// END OF EJS Templates
Makes the folder for attachments storage configurable in config/configuration.yml (#1236)....
Jean-Philippe Lang -
r4635:7dd464c577bd
parent child
Show More
@@ -43,7 +43,7 class Attachment < ActiveRecord::Base
43 "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
43 "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
44
44
45 cattr_accessor :storage_path
45 cattr_accessor :storage_path
46 @@storage_path = "#{RAILS_ROOT}/files"
46 @@storage_path = Redmine::Configuration['attachments_storage_path'] || "#{RAILS_ROOT}/files"
47
47
48 def validate
48 def validate
49 if self.filesize > Setting.attachment_max_size.to_i.kilobytes
49 if self.filesize > Setting.attachment_max_size.to_i.kilobytes
@@ -79,6 +79,7
79
79
80 # default configuration options for all environments
80 # default configuration options for all environments
81 default:
81 default:
82 # Outgoing emails configuration (see examples above)
82 email_delivery:
83 email_delivery:
83 delivery_method: :smtp
84 delivery_method: :smtp
84 smtp_settings:
85 smtp_settings:
@@ -89,6 +90,15 default:
89 user_name: "redmine@example.net"
90 user_name: "redmine@example.net"
90 password: "redmine"
91 password: "redmine"
91
92
93 # Absolute path to the directory where attachments are stored.
94 # The default is the 'files' directory in your Redmine instance.
95 # Your Redmine instance needs to have write permission on this
96 # directory.
97 # Examples:
98 # attachments_storage_path: /var/redmine/files
99 # attachments_storage_path: D:/redmine/files
100 attachments_storage_path:
101
92 # specific configuration options for production environment
102 # specific configuration options for production environment
93 # that overrides the default ones
103 # that overrides the default ones
94 production:
104 production:
General Comments 0
You need to be logged in to leave comments. Login now