From f3fda54f0c4471d06a7d5c37c31e414afacac43a Mon Sep 17 00:00:00 2001 From: yuanzhao <2206582181@qq.com> Date: Fri, 3 Mar 2023 14:34:06 +0800 Subject: [PATCH] =?UTF-8?q?fea:=20=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootstrap/services/filesystem/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/services/filesystem/local.go b/bootstrap/services/filesystem/local.go index 3de3451..eeacfe2 100644 --- a/bootstrap/services/filesystem/local.go +++ b/bootstrap/services/filesystem/local.go @@ -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, "//", "")