fix multipart
Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -12,6 +12,7 @@ import ( | ... | @@ -12,6 +12,7 @@ import ( |
| 12 | "net/url" | 12 | "net/url" |
| 13 | "path" | 13 | "path" |
| 14 | "strconv" | 14 | "strconv" |
| 15 | "strings" | ||
| 15 | ) | 16 | ) |
| 16 | 17 | ||
| 17 | type Controller struct { | 18 | type Controller struct { |
| ... | @@ -172,7 +173,7 @@ func (c *Controller) ServeXml() { | ... | @@ -172,7 +173,7 @@ func (c *Controller) ServeXml() { |
| 172 | 173 | ||
| 173 | func (c *Controller) Input() url.Values { | 174 | func (c *Controller) Input() url.Values { |
| 174 | ct := c.Ctx.Request.Header.Get("Content-Type") | 175 | ct := c.Ctx.Request.Header.Get("Content-Type") |
| 175 | if ct == "multipart/form-data" { | 176 | if strings.Contains(ct, "multipart/form-data") { |
| 176 | c.Ctx.Request.ParseMultipartForm(MaxMemory) //64MB | 177 | c.Ctx.Request.ParseMultipartForm(MaxMemory) //64MB |
| 177 | } else { | 178 | } else { |
| 178 | c.Ctx.Request.ParseForm() | 179 | c.Ctx.Request.ParseForm() | ... | ... |
-
Please register or sign in to post a comment