This commit is contained in:
suyl
2021-06-30 14:07:56 +08:00
parent 6fae4fd46b
commit 323fe01518

View File

@@ -49,7 +49,7 @@ func SNSUploadImg(ctx *jxcontext.Context, files []*multipart.FileHeader, isThumb
snsUploadImgResult = &SNSUploadImgResult{} snsUploadImgResult = &SNSUploadImgResult{}
file, err := fileHeader.Open() file, err := fileHeader.Open()
file.Read(data) file.Read(data)
file.Close() defer file.Close()
if len(data) == 0 { if len(data) == 0 {
return snsUploadImgResult, fmt.Errorf("未读取到文件!") return snsUploadImgResult, fmt.Errorf("未读取到文件!")
} }