Versions in this module Expand all Collapse all v2 v2.2.1 May 13, 2021 v2.2.0 May 12, 2021 Changes in this version + const MB + const MaxLevel + const UploadErrorCantWrite + const UploadErrorExtension + const UploadErrorNoFile + const UploadErrorNoTmpDir + const UploadErrorOK + var TrailerHeaderKey = http.CanonicalHeaderKey("trailer") + func FetchIndexes(s string) []string + type ErrorEvent struct + Error error + Request *http.Request + func (e *ErrorEvent) Elapsed() time.Duration + type FileUpload struct + Error int + Mime string + Name string + Size int64 + TempFilename string + func NewUpload(f *multipart.FileHeader) *FileUpload + func (f *FileUpload) Open(cfg config.Uploads) (err error) + type Handler struct + func NewHandler(maxReqSize uint64, uploads config.Uploads, trusted config.Cidrs, ...) (*Handler, error) + func (h *Handler) AddListener(l events.Listener) + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Request struct + Attributes map[string]interface{} + Cookies map[string]string + Header http.Header + Method string + Parsed bool + Protocol string + RawQuery string + RemoteAddr string + URI string + Uploads *Uploads + func NewRequest(r *http.Request, cfg config.Uploads) (*Request, error) + func (r *Request) Close(log logger.Logger) + func (r *Request) Open(log logger.Logger) + func (r *Request) Payload() (payload.Payload, error) + type Response struct + Body interface{} + Headers map[string][]string + Status int + func NewResponse(p payload.Payload) (*Response, error) + func (r *Response) Write(w http.ResponseWriter) error + type ResponseEvent struct + Request *Request + Response *Response + func (e *ResponseEvent) Elapsed() time.Duration + type Uploads struct + func (u *Uploads) Clear(log logger.Logger) + func (u *Uploads) MarshalJSON() ([]byte, error) + func (u *Uploads) Open(log logger.Logger)