mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 08:20:54 +00:00
fix multipart
This commit is contained in:
parent
465ed4b72f
commit
dc5dab3dbb
@ -12,6 +12,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Controller struct {
|
type Controller struct {
|
||||||
@ -172,7 +173,7 @@ func (c *Controller) ServeXml() {
|
|||||||
|
|
||||||
func (c *Controller) Input() url.Values {
|
func (c *Controller) Input() url.Values {
|
||||||
ct := c.Ctx.Request.Header.Get("Content-Type")
|
ct := c.Ctx.Request.Header.Get("Content-Type")
|
||||||
if ct == "multipart/form-data" {
|
if strings.Contains(ct, "multipart/form-data") {
|
||||||
c.Ctx.Request.ParseMultipartForm(MaxMemory) //64MB
|
c.Ctx.Request.ParseMultipartForm(MaxMemory) //64MB
|
||||||
} else {
|
} else {
|
||||||
c.Ctx.Request.ParseForm()
|
c.Ctx.Request.ParseForm()
|
||||||
|
Loading…
Reference in New Issue
Block a user