Why does file upload not work without the enctype property?

后端 未结 2 1131
暖寄归人
暖寄归人 2020-11-29 04:58

Most of time, the source of file uploading errors are that we forget to add the enctype property in the HTML form.

Normally, we do not need to add the <

2条回答
  •  温柔的废话
    2020-11-29 05:18

    You may want to look at the comments here: http://www.velocityreviews.com/forums/t137597-html-file-upload-using-enctype-multipart-form-data-in-form.html

    Short answer is that the enctype tells the browser how to send the file. It won't be able to send the file without the correct encoding type.

提交回复
热议问题