dcsunny 4 лет назад
Родитель
Сommit
7e98c8f438
1 измененных файлов с 1 добавлено и 2 удалено
  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
 	}