Feat: after uploading hooks and checks

This commit is contained in:
HFO4
2019-11-18 19:09:56 +08:00
parent 0dddc12609
commit aa17aa8e6a
10 changed files with 105 additions and 16 deletions

View File

@@ -85,6 +85,11 @@ func (policy *Policy) GeneratePath(uid uint) string {
// GenerateFileName 生成存储文件名
func (policy *Policy) GenerateFileName(uid uint, origin string) string {
// 未开启自动重命名时,直接返回原始文件名
if !policy.AutoRename {
return origin
}
fileRule := policy.FileNameRule
replaceTable := map[string]string{