Documentation
¶
Index ¶
Constants ¶
const DefaultMaxMemory = 32 << 20 // 32mb
DefaultMaxMemory defines the default max memory bytes that will be used when parsing a form request body.
Variables ¶
This section is empty.
Functions ¶
func BindBody ¶
func BindBody(c echo.Context, i interface{}) error
BindBody binds request body content to i.
This is similar to `echo.BindBody()`, but for JSON requests uses custom json reader that **copies** the request body, allowing multiple reads.
func CopyJsonBody ¶ added in v0.8.0
CopyJsonBody reads the request body into i by creating a copy of `r.Body` to allow multiple reads.
func NormalizeUrl ¶ added in v0.5.0
NormalizeUrl removes duplicated slashes from a url path.
Types ¶
type UploadedFile ¶
type UploadedFile struct {
// contains filtered or unexported fields
}
UploadedFile defines a single multipart uploaded file instance.
func FindUploadedFiles ¶
func FindUploadedFiles(r *http.Request, key string) ([]*UploadedFile, error)
FindUploadedFiles extracts all form files of `key` from a http request and returns a slice with `UploadedFile` instances (if any).
func (*UploadedFile) Header ¶
func (f *UploadedFile) Header() *multipart.FileHeader
Header returns the file header that comes with the multipart request.
func (*UploadedFile) Name ¶
func (f *UploadedFile) Name() string
Name returns an assigned unique name to the uploaded file.