Form used to submit files needs to modify its entype attribute.
enctype attribute: Specifies how to encode form data before sending it.
By default, the encoding format of enctype is application/x-www-form-urlencoded, which cannot be used for file upload;
When you need to upload files, you need to change the encoding method to: multipart/form -data
The following is an introduction to the value of the enctype attribute:
application/x-www-form-urlencoded: [default] when sending Pre-encode all characters (spaces are converted to " " plus signs, special symbols are converted to ASCII HEX values)
multipart/form-data: Do not encode characters. This value is required when using a form that contains a file upload control.
text/plain: spaces are converted to " " plus signs, but special characters are not encoded.