Skip to content
Myr

[FIX] c.Request.FormFile maybe file, need close (#2114)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by linfangrong · committed by thinkerou · parent aabaccb · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:context.go+5 added-1 removed
514 unmodified lines
515 if err := c.Request.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {516 return nil, err517 }518 }519 _, fh, err := c.Request.FormFile(name)519 f, fh, err := c.Request.FormFile(name)520 if err != nil {521 return nil, err522 }523 f.Close()524 return fh, err525}526527// MultipartForm is the parsed multipart form, including file uploads.
544 unmodified lines