A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix img upload
aichy1267496897855d1
diff --git a/internal/service/uploader/upload.go b/internal/service/uploader/upload.goindex 1fc094d6..ca8ab3a0 100644--- a/internal/service/uploader/upload.go+++ b/internal/service/uploader/upload.go@@ -89,7 +89,7 @@ func (us *UploaderService) AvatarThumbFile(ctx *gin.Context, uploadPath, fileNamif !ok {return avatarfile, fmt.Errorf("img extension not exist")}- err = imaging.Encode(&buf, new_image, formatExts[fileSuffix])+ err = imaging.Encode(&buf, new_image, FormatExts[fileSuffix])if err != nil {return avatarfile, errors.InternalServer(reason.UnknownError).WithError(err).WithStack()