Merge branch 'refs/heads/feat-model-file-img'

This commit is contained in:
junleea 2025-04-07 19:23:03 +08:00
commit 65a76adb0b
1 changed files with 4 additions and 1 deletions

View File

@ -253,7 +253,10 @@ func CreateUserFile(userID int, fileAuthName string, fileID int, UploadType stri
log.Println("file auth name already exist, please change another name: ", fileAuthName) log.Println("file auth name already exist, please change another name: ", fileAuthName)
//将要保存的文件名改为fileAuthName+uuid //将要保存的文件名改为fileAuthName+uuid
strs := strings.Split(fileAuth.UserFileName, ".") strs := strings.Split(fileAuth.UserFileName, ".")
fileAuthName = strs[0] + "_1." + strs[1] //当前时间戳
timestamp := time.Now().Unix()
timestampStr := fmt.Sprintf("%d", timestamp)
fileAuthName = strs[0] + "_" + timestampStr + "." + strs[1]
//return fileAuth //return fileAuth
} }
fileAuth_ := dao.CreateFileAuth(userID, fileID, fileAuthName, UploadType, 1, "") fileAuth_ := dao.CreateFileAuth(userID, fileID, fileAuthName, UploadType, 1, "")