FormFile returns the multipart form file for the provided name.
(name string)
| 424 | |
| 425 | // FormFile returns the multipart form file for the provided name. |
| 426 | func (c *Context) FormFile(name string) (*multipart.FileHeader, error) { |
| 427 | f, fh, err := c.request.FormFile(name) |
| 428 | if err != nil { |
| 429 | return nil, err |
| 430 | } |
| 431 | _ = f.Close() |
| 432 | return fh, nil |
| 433 | } |
| 434 | |
| 435 | // MultipartForm returns the multipart form. |
| 436 | func (c *Context) MultipartForm() (*multipart.Form, error) { |