@@ -43,7 +43,7 class Attachment < ActiveRecord::Base | |||
|
43 | 43 | "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"} |
|
44 | 44 | |
|
45 | 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 | 48 | def validate |
|
49 | 49 | if self.filesize > Setting.attachment_max_size.to_i.kilobytes |
@@ -79,6 +79,7 | |||
|
79 | 79 | |
|
80 | 80 | # default configuration options for all environments |
|
81 | 81 | default: |
|
82 | # Outgoing emails configuration (see examples above) | |
|
82 | 83 | email_delivery: |
|
83 | 84 | delivery_method: :smtp |
|
84 | 85 | smtp_settings: |
@@ -89,6 +90,15 default: | |||
|
89 | 90 | user_name: "redmine@example.net" |
|
90 | 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 | 102 | # specific configuration options for production environment |
|
93 | 103 | # that overrides the default ones |
|
94 | 104 | production: |
General Comments 0
You need to be logged in to leave comments.
Login now