mirror of https://gitee.com/answerdev/answer.git
fix img upload
This commit is contained in:
parent
8b399dbe66
commit
7496897855
|
@ -89,7 +89,7 @@ func (us *UploaderService) AvatarThumbFile(ctx *gin.Context, uploadPath, fileNam
|
||||||
if !ok {
|
if !ok {
|
||||||
return avatarfile, fmt.Errorf("img extension not exist")
|
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 {
|
if err != nil {
|
||||||
return avatarfile, errors.InternalServer(reason.UnknownError).WithError(err).WithStack()
|
return avatarfile, errors.InternalServer(reason.UnknownError).WithError(err).WithStack()
|
||||||
|
|
Loading…
Reference in New Issue