dc5dab3d by astaxie

fix multipart

1 parent 465ed4b7
...@@ -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()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!