adapt CopyBody MaxMemory size to current request's body size

This commit is contained in:
pb 2024-08-28 10:00:08 +02:00
parent 6ddfe5dcf1
commit b3e7525a2b

View File

@ -70,7 +70,10 @@ func (o *WorkflowController) Post() {
},
}
var res map[string]interface{}
json.Unmarshal(o.Ctx.Input.CopyBody(10000), &res)
body_size := int64(len((*(*(*o).Controller.Ctx).Input).RequestBody))
json.Unmarshal(o.Ctx.Input.CopyBody(body_size), &res)
caller := tools.NewHTTPCaller(paths)
data := oclib.StoreOne(oclib.LibDataEnum(oclib.WORKFLOW), res, caller)
o.Data["json"] = data