This commit is contained in:
momo 2023-08-21 19:01:33 +08:00
parent e2e8f59fc5
commit 2ee1b53f22

View File

@ -96,10 +96,10 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
} }
// 限制上传文件大小 50k // 限制上传文件大小 50k
maxSize := 100 * 1024 // maxSize := 100 * 1024
if fileHeader.Size > int64(maxSize) { // if fileHeader.Size > int64(maxSize) {
return resp.SetStatus(basic.CodeFileUploadErr, "file upload err,The file size exceeds the maximum limit of 100k") // return resp.SetStatus(basic.CodeFileUploadErr, "file upload err,The file size exceeds the maximum limit of 100k")
} // }
// 读取数据流 // 读取数据流
ioData, err := io.ReadAll(fileObject) ioData, err := io.ReadAll(fileObject)