Описание тега multipartform-data
multipart/form-data
is a content-type used to send the content of a html-form, including file-upload, to web-services using http post requests. It belongs to the multipart family of mime-types. So it consists of several parts, each with its own header and delimited using a (usually randomly generated) boundary string. The boundary string is given as a parameter to the content type of the whole document, as specified in the HTTP header. The field names are specified using the content-disposition header of each part.
The multipart/form-data
type is specified in RFC 2388.
multipart/form-data
provides a more powerful alternative to the application/x-www-form-urlencoded
type which will by default be used to submit form data in the body of a POST request. It adds the ability to transfer files, submit file names and content types for each of these, and also allows for different form fields to use different encodings. The added versatility comes at the cost of more overhead to process and transmit these messages, and in the early days a lack of interoperability with systems not supporting the method. As the method is only used if the form explicitly asks for it, the latter is of little practical concern except for those writing such forms.