1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Close file descriptor returned by request.FormFile (#1411)

This commit is contained in:
Argishti Rostamian 2019-10-24 11:52:14 -07:00 committed by Vishal Rana
parent ee6618e831
commit 754b44989f

View File

@ -347,7 +347,8 @@ func (c *context) FormParams() (url.Values, error) {
}
func (c *context) FormFile(name string) (*multipart.FileHeader, error) {
_, fh, err := c.request.FormFile(name)
f, fh, err := c.request.FormFile(name)
defer f.Close()
return fh, err
}