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