summaryrefslogtreecommitdiffstats
path: root/modules/setting/attachment.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/attachment.go')
-rw-r--r--modules/setting/attachment.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/setting/attachment.go b/modules/setting/attachment.go
index 68a2e87204..8b6eb9fd7a 100644
--- a/modules/setting/attachment.go
+++ b/modules/setting/attachment.go
@@ -20,11 +20,11 @@ var Attachment = struct {
Enabled: true,
}
-func newAttachmentService() {
- sec := Cfg.Section("attachment")
+func loadAttachmentFrom(rootCfg ConfigProvider) {
+ sec := rootCfg.Section("attachment")
storageType := sec.Key("STORAGE_TYPE").MustString("")
- Attachment.Storage = getStorage("attachments", storageType, sec)
+ Attachment.Storage = getStorage(rootCfg, "attachments", storageType, sec)
Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip")
Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4)