Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
7542c35184
|
@ -16,5 +16,5 @@ AWS:
|
|||
Token:
|
||||
BLMService:
|
||||
ImageProcess:
|
||||
#Url: "http://192.168.1.7:45678/FeatureExtraction"
|
||||
# Url: "http://192.168.1.7:8999/FeatureExtraction"
|
||||
Url: "http://18.119.109.254:8999/FeatureExtraction"
|
||||
|
|
|
@ -44,16 +44,11 @@ func NewUploadFileBackendLogic(r *http.Request, svcCtx *svc.ServiceContext) *Upl
|
|||
func (l *UploadFileBackendLogic) UploadFileBackend(req *types.UploadFileBackendReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||||
// userinfo 传入值时, 一定不为null
|
||||
if userinfo.IsOnlooker() {
|
||||
// 如果是,返回未授权的错误码
|
||||
return resp.SetStatus(basic.CodeUnAuth)
|
||||
}
|
||||
|
||||
// 定义用户ID和S3键名格式
|
||||
var userId int64
|
||||
var guestId int64
|
||||
var userId int64 = 0
|
||||
var guestId int64 = 0
|
||||
|
||||
// 检查用户是否是游客
|
||||
if userinfo != nil {
|
||||
if userinfo.IsGuest() {
|
||||
// 如果是,使用游客ID和游客键名格式
|
||||
guestId = userinfo.GuestId
|
||||
|
@ -61,6 +56,7 @@ func (l *UploadFileBackendLogic) UploadFileBackend(req *types.UploadFileBackendR
|
|||
// 否则,使用用户ID和用户键名格式
|
||||
userId = userinfo.UserId
|
||||
}
|
||||
}
|
||||
|
||||
//设置内存大小
|
||||
l.r.ParseMultipartForm(32 << 20)
|
||||
|
|
Loading…
Reference in New Issue
Block a user