From 5ed865d2e4b8a8aca113808584b03bebf4c14ef7 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 9 Oct 2013 16:00:20 -0400 Subject: [PATCH] setting variable for form parsing byte buffer --- server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 29ddea4..5765dd6 100644 --- a/server.go +++ b/server.go @@ -21,7 +21,8 @@ import ( ) var ( - defaultPageLimit int = 25 + defaultPageLimit int = 25 + maxBytes int64 = 1024 * 512 serverConfig config.Config du dbutil.Util ) @@ -710,7 +711,7 @@ func routeUpload(w http.ResponseWriter, r *http.Request) { } // handle the form posting to this route - err := r.ParseMultipartForm(1024 * 5) + err := r.ParseMultipartForm(maxBytes) if err != nil { serverErr(w, r, err) return