From 21b223b8d37208bdfb45d49dc7c35a557255e548 Mon Sep 17 00:00:00 2001 From: arkhvoid <43354994+arkhvoid@users.noreply.github.com> Date: Mon, 13 Jul 2020 04:36:16 +0800 Subject: [PATCH] Fix typo cause memory problem on upload --- graphql/handler/transport/http_form.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql/handler/transport/http_form.go b/graphql/handler/transport/http_form.go index 987d4c3e158..4afc154bda3 100644 --- a/graphql/handler/transport/http_form.go +++ b/graphql/handler/transport/http_form.go @@ -64,7 +64,7 @@ func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.G return } r.Body = http.MaxBytesReader(w, r.Body, f.maxUploadSize()) - if err = r.ParseMultipartForm(f.maxUploadSize()); err != nil { + if err = r.ParseMultipartForm(f.maxMemory()); err != nil { w.WriteHeader(http.StatusUnprocessableEntity) if strings.Contains(err.Error(), "request body too large") { writeJsonError(w, "failed to parse multipart form, request body too large")