Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
@@ -15,8 +15,8 @@ AWS:
|
||||
Secret: sjCEv0JxATnPCxno2KNLm0X8oDc7srUR+4vkYhvm
|
||||
Token:
|
||||
BLMService:
|
||||
# Url: "http://18.119.109.254:8999"
|
||||
Url: "http://192.168.1.7:8999"
|
||||
Url: "http://18.119.109.254:8999"
|
||||
# Url: "http://192.168.1.7:8999"
|
||||
LogoCombine:
|
||||
#Url: "http://192.168.1.7:8999/LogoCombine"
|
||||
Url: "http://18.119.109.254:8999/LogoCombine"
|
||||
@@ -2,6 +2,7 @@ Name: upload
|
||||
Host: 0.0.0.0
|
||||
Port: 9912
|
||||
Timeout: 150000 #服务超时时间
|
||||
MaxBytes: 104857600 #传输字节大小
|
||||
SourceMysql: "fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest"
|
||||
Env: "test"
|
||||
Auth:
|
||||
|
||||
@@ -95,6 +95,12 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
|
||||
return resp.SetStatus(basic.CodeFileUploadErr, "file upload err,file is not image")
|
||||
}
|
||||
|
||||
// 限制上传文件大小 50k
|
||||
maxSize := 100 * 1024
|
||||
if fileHeader.Size > int64(maxSize) {
|
||||
return resp.SetStatus(basic.CodeFileUploadErr, "file upload err,The file size exceeds the maximum limit of 100k")
|
||||
}
|
||||
|
||||
// 读取数据流
|
||||
ioData, err := io.ReadAll(fileObject)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user