dcsunny 4 år sedan
förälder
incheckning
7e98c8f438
1 ändrade filer med 1 tillägg och 2 borttagningar
  1. 1 2
      http/handle.go

+ 1 - 2
http/handle.go

@@ -4,7 +4,6 @@ import (
 	"bytes"
 	json2 "encoding/json"
 	"io/ioutil"
-	"math"
 	"net/http"
 	"strings"
 
@@ -42,7 +41,7 @@ func DecodeRequest(req *http.Request, v interface{}) error {
 }
 
 func parseForm(req *http.Request, v interface{}) error {
-	err := req.ParseMultipartForm(math.MaxInt64)
+	err := req.ParseMultipartForm(32 << 20)
 	if err != nil {
 		return err
 	}