default_context.go
func (d *DefaultContext) File(name string) (binding.File, error) {
	req := d.Request()
	if err := req.ParseMultipartForm(5 * 1024 * 1024); err != nil {
		return binding.File{}, err
	}
	f, h, err := req.FormFile(name)
	bf := binding.File{
		File:       f,
		FileHeader: h,
	}
	if err != nil {
		return bf, err
	}
	return bf, nil
}
func (d *DefaultContext) File(name string) (binding.File, error) {
	req := d.Request()
	if err := req.ParseMultipartForm(5 * 1024 * 1024); err != nil {
		return binding.File{}, err
	}
	f, h, err := req.FormFile(name)
	bf := binding.File{
		File:       f,
		FileHeader: h,
	}
	if err != nil {
		return bf, err
	}
	return bf, nil
}
func ( d * DefaultContext ) File ( name string ) ( binding . File , error ) { req := d . Request ( ) if err := req . ParseMultipartForm ( 5 * 1024 * 1024 ) ; err != nil { return binding . File { } , err } f , h , err := req . FormFile ( name ) bf := binding . File { File : f , FileHeader : h , } if err != nil { return bf , err } return bf , nil }
// File returns an uploaded file by name, or an error
File returns an uploaded file by name or an error