Skip to content

Commit

Permalink
fea: 上传文件
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-home committed Mar 3, 2023
1 parent 43344ff commit f3fda54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap/services/filesystem/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (l *Local) FormFile(c *gin.Context, up, to string) (string, error) {
return "", err
}
}
newFileName := uuid.NewV4().String() + "." + path.Ext(file.Filename)
newFileName := uuid.NewV4().String() + path.Ext(file.Filename)
// 拼接目标文件路径
dst = dst + "/" + newFileName
dst = strings.ReplaceAll(dst, "//", "")
Expand Down

0 comments on commit f3fda54

Please sign in to comment.