modified: models/policy.go (#1718)

modified:   models/policy_test.go
This commit is contained in:
Arkylin
2023-05-24 12:09:24 +08:00
committed by GitHub
parent 00d56d6d07
commit 6358740cc9
2 changed files with 7 additions and 0 deletions

View File

@@ -170,6 +170,7 @@ func (policy *Policy) GenerateFileName(uid uint, origin string) string {
"{second}": time.Now().Format("05"),
"{originname}": origin,
"{ext}": filepath.Ext(origin),
"{originname_without_ext}": strings.TrimSuffix(origin, filepath.Ext(origin)),
"{uuid}": uuid.Must(uuid.NewV4()).String(),
}