package multipart
Import Path
mime/multipart (on golang.org and go.dev)
Dependency Relation
imports 13 packages, and imported by one package
Involved Source Files
formdata.go
d-> multipart.go
writer.go
Exported Type Names
type File (interface)
File is an interface to access the file part of a multipart message.
Its contents may be either stored in memory or on disk.
If stored on disk, the File's underlying concrete type will be an *os.File.
(T) Close() error
(T) Read(p []byte) (n int, err error)
(T) ReadAt(p []byte, off int64) (n int, err error)
(T) Seek(offset int64, whence int) (int64, error)
os.(*File)
T : io.Closer
T : io.ReadCloser
T : io.Reader
T : io.ReaderAt
T : io.ReadSeeker
T : io.Seeker
func (*FileHeader).Open() (File, error)
func net/http.(*Request).FormFile(key string) (File, *FileHeader, error)
type FileHeader (struct)
A FileHeader describes a file part of a multipart request.
Filename string
Header textproto.MIMEHeader
Size int64
(*T) Open() (File, error)
func net/http.(*Request).FormFile(key string) (File, *FileHeader, error)
type Form (struct)
Form is a parsed multipart form.
Its File parts are stored either in memory or on disk,
and are accessible via the *FileHeader's Open method.
Its Value parts are stored as strings.
Both are keyed by field name.
File map[string][]*FileHeader
Value map[string][]string
(*T) RemoveAll() error
func (*Reader).ReadForm(maxMemory int64) (*Form, error)
type Part (struct)
A Part represents a single part in a multipart body.
Header textproto.MIMEHeader
(*T) Close() error
(*T) FileName() string
(*T) FormName() string
(*T) Read(d []byte) (n int, err error)
*T : io.Closer
*T : io.ReadCloser
*T : io.Reader
func (*Reader).NextPart() (*Part, error)
func (*Reader).NextRawPart() (*Part, error)
type Reader (struct)
Reader is an iterator over parts in a MIME multipart body.
Reader's underlying parser consumes its input as needed. Seeking
isn't supported.
(*T) NextPart() (*Part, error)
(*T) NextRawPart() (*Part, error)
(*T) ReadForm(maxMemory int64) (*Form, error)
func NewReader(r io.Reader, boundary string) *Reader
func net/http.(*Request).MultipartReader() (*Reader, error)
type Writer (struct)
A Writer generates multipart messages.
(*T) Boundary() string
(*T) Close() error
(*T) CreateFormField(fieldname string) (io.Writer, error)
(*T) CreateFormFile(fieldname, filename string) (io.Writer, error)
(*T) CreatePart(header textproto.MIMEHeader) (io.Writer, error)
(*T) FormDataContentType() string
(*T) SetBoundary(boundary string) error
(*T) WriteField(fieldname, value string) error
*T : io.Closer
func NewWriter(w io.Writer) *Writer
Exported Values
var ErrMessageTooLarge error
ErrMessageTooLarge is returned by ReadForm if the message form
data is too large to be processed.
![]() |
The pages are generated with Golds v0.1.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project and developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |