Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeaderAuthorization = "Authorization" HeaderContentType = "Content-Type" ContentTypeMultipartFormData = "multipart/form-data" )
Variables ¶
View Source
var ErrNotExist = errors.New("object not exist")
Functions ¶
Types ¶
type DataReadCloser ¶
type DataReadCloser struct {
// contains filtered or unexported fields
}
DataReadCloser provides a transparent way to read data from a temporary file on disk
func (*DataReadCloser) Close ¶
func (f *DataReadCloser) Close() error
Close and remove the temporary file
type File ¶
type File struct { Path string Reader io.ReadCloser }
File represents a file in a multipart form
type MultipartForm ¶
type MultipartForm struct {
// contains filtered or unexported fields
}
func MultipartFormFromRequest ¶
func MultipartFormFromRequest(r *http.Request) (*MultipartForm, error)
func (*MultipartForm) DeserializedObject ¶
func (f *MultipartForm) DeserializedObject(name string, v interface{}) error
func (*MultipartForm) Files ¶
func (f *MultipartForm) Files() []*File
func (*MultipartForm) Process ¶
func (f *MultipartForm) Process(objectNames []string) error
Process reads the form body and parses it into objects or files, where objectNames is a list of form names that should be treated as objects Note: objectNames take precedence over files
Click to show internal directories.
Click to hide internal directories.