dcsunny 4 年之前
父節點
當前提交
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
 	}