diff options
Diffstat (limited to 'service/http/uploads_config.go')
-rw-r--r-- | service/http/uploads_config.go | 6 |
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 != "" { |