fix img upload

This commit is contained in:
aichy126 2022-10-28 10:43:53 +08:00
parent 8b399dbe66
commit 7496897855
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ func (us *UploaderService) AvatarThumbFile(ctx *gin.Context, uploadPath, fileNam
if !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()