The role of enctype=multipart/form-data in form
The meaning of enctype= "Multipart/form-data" in the form is to set the MIME encoding of the form. By default,
This encoding format is application/x-www-form-urlencoded and cannot be used for file upload;
Only use the Multipart/form-data to complete the transfer of file data, the following operation.
In the syntax of the form element, enctype indicates the format of the submitted data
Use the Enctype property to specify the type of encoding the browser uses when sending data back to the server.
Below is the description:
application/x-www-form-urlencoded: The form data is encoded as a name/value pair. This is the standard encoding format.
Multipart/form-data: The form data is encoded as a message, and each control on the page corresponds to a part of the message.
Text/plain: Form data is encoded in plain text with no controls or formatting characters
application/x-www-form-urlencoded