From b3e7525a2b18ef152e4d190428076d4cf9e9e27e Mon Sep 17 00:00:00 2001 From: pb Date: Wed, 28 Aug 2024 10:00:08 +0200 Subject: [PATCH] adapt CopyBody MaxMemory size to current request's body size --- controllers/workflow.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/workflow.go b/controllers/workflow.go index 99df64d..712c336 100644 --- a/controllers/workflow.go +++ b/controllers/workflow.go @@ -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