Fix: nil pointer and initial policy file type wildcard

This commit is contained in:
HFO4
2020-03-10 12:10:30 +08:00
parent 27e1da8238
commit cb57fdbb59
2 changed files with 1 additions and 4 deletions

View File

@@ -66,9 +66,6 @@ func addDefaultPolicy() {
DirNameRule: "uploads/{uid}/{path}",
FileNameRule: "{uid}_{randomkey8}_{originname}",
IsOriginLinkEnable: false,
OptionsSerialized: PolicyOption{
FileType: []string{},
},
}
if err := DB.Create(&defaultPolicy).Error; err != nil {
util.Log().Panic("无法创建初始存储策略, %s", err)