Skip to content

Commit

Permalink
Fix typo cause memory problem on upload
Browse files Browse the repository at this point in the history
  • Loading branch information
arkhvoid authored Jul 12, 2020
1 parent 8494028 commit 21b223b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql/handler/transport/http_form.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 21b223b

Please sign in to comment.