Differences between multipart/form-data and application/x-www-form-urlencoded. Read the differences between multipart/form-data and application/x-www-form-urlencoded, the enctype attribute of the FORM element specifies the encoding type used when the FORM data is submitted to the server. the default value is
The enctype attribute of the FORM element specifies the encoding type used when the form data is submitted to the server. the default value is "application/x-www-FORM-urlencoded ".
However, this encoding method is inefficient when sending large amounts of text, text containing non-ASCII characters or binary data to the server.
During file upload, the encoding type used should be "multipart/form-data". it can send text data and upload binary data.
Browser end
The value of the form's ENCTYPE is multipart/form-data, which tells us that the transmitted data needs to use the multimedia transmission protocol, because the multimedia transmission is a large amount of data, therefore, the post method must be used to upload files, The type attribute of must be file.