From 3e33992542c018f182fc9542d63c932ea5166f4f Mon Sep 17 00:00:00 2001 From: jhc Date: Mon, 24 Feb 2025 18:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/logic/upload.go | 1 + pkg/service/upload/upload.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/logic/upload.go b/pkg/logic/upload.go index df34740..9ae2ba3 100644 --- a/pkg/logic/upload.go +++ b/pkg/logic/upload.go @@ -182,6 +182,7 @@ func MakeThumbnailDefault90(imagePath, savePath string) error { return err } img = rotate90(img) + newImg, _ := os.Create(savePath) defer newImg.Close() switch prefix { diff --git a/pkg/service/upload/upload.go b/pkg/service/upload/upload.go index 68ad253..cbd2d88 100644 --- a/pkg/service/upload/upload.go +++ b/pkg/service/upload/upload.go @@ -139,8 +139,7 @@ func UploadImg(c *gin.Context) { fileFullName = fmt.Sprintf("%s%s", filename, fileExt) newDst := fmt.Sprintf("%s/%s_rotate%v", imgPath, filename, fileExt) if err = logic.MakeThumbnailDefault90(dst, newDst); err != nil { - //ResponseQuickMsg(c, e.Failed, e.GetMsg(e.ERROR_ROTATE_IMG), nil) - //return + fmt.Printf("MakeThumbnailDefault90 err %+v\n", err) } else { _ = os.Remove(dst) dst = newDst