[FIX] c.Request.FormFile maybe file, need close (#2114)
This commit is contained in:
parent
aabaccbba2
commit
0f951956d0
@ -516,7 +516,11 @@ func (c *Context) FormFile(name string) (*multipart.FileHeader, error) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
_, fh, err := c.Request.FormFile(name)
|
||||
f, fh, err := c.Request.FormFile(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
f.Close()
|
||||
return fh, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user