summaryrefslogtreecommitdiff
path: root/service/http/uploads_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/http/uploads_config.go')
-rw-r--r--service/http/uploads_config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/http/uploads_config.go b/service/http/uploads_config.go
index e90d9b70..3f655064 100644
--- a/service/http/uploads_config.go
+++ b/service/http/uploads_config.go
@@ -16,6 +16,12 @@ type UploadsConfig struct {
Forbid []string
}
+// InitDefaults sets missing values to their default values.
+func (cfg *UploadsConfig) InitDefaults() error {
+ cfg.Forbid = []string{".php", ".exe", ".bat"}
+ return nil
+}
+
// TmpDir returns temporary directory.
func (cfg *UploadsConfig) TmpDir() string {
if cfg.Dir != "" {