summaryrefslogtreecommitdiff
path: root/service/http/uploads_config.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-23 15:00:51 +0300
committerWolfy-J <[email protected]>2018-09-23 15:00:51 +0300
commit46c53d51cd8edd4e934c47f49f806758f4ccad63 (patch)
tree5e04c41ebb1b8eba5713c992c3d4866e8fb959fb /service/http/uploads_config.go
parent19d88fc879ba403347726138eb532fb85d38168e (diff)
default configs
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 != "" {