Merge branch 'refs/heads/feat-model-file-img'
This commit is contained in:
commit
65a76adb0b
|
|
@ -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)
|
||||
//将要保存的文件名改为fileAuthName+uuid
|
||||
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
|
||||
}
|
||||
fileAuth_ := dao.CreateFileAuth(userID, fileID, fileAuthName, UploadType, 1, "")
|
||||
|
|
|
|||
Loading…
Reference in New Issue