Recently doing the Epartner project, involving issues uploaded by documents. I have been uploaded before, but I'm all small documents, no more than
2M
. This time I ask for uploading
100M
The above things. There is no way to find the information. WEB-based file uploading can use FTP and HTTP protocols, although the transfer is stable, but security is a serious problem, and the FTP server reads the user library to obtain permissions, which is not very convenient for the user. There is only HTTP left. There are 3 ways, PUT, WebDAV, RFC1867, and the first two methods are not suitable for large files. We currently Uploads we use the RFC1867-based HTML to upload files.
First, first briefly introduce the RFC1867 (Form-Based File Upload In HTML) standard:
1. HTML form with file submission function
The existing HTML specification defines eight possible values for the INPUT element. They are: Checkbox, Hidden, Image, Password, Radio, Reset, Submit, Text. In addition, the form is default when the form uses the POST mode. ENCTYPE attribute with "Application / X-WWW-FORM-URLENCODED".
The RFC1867 standard made two modifications to HTML:
1) Add a FILE option to the Type property of the INPUT element.
2) The Input tag can have an Accept property that specifies a list of file types or file formats that can be uploaded.
In addition, this standard also defines a new MIME type: Multipart / Form-Data, and a tag that is processed with ENCTYPE = "Multipart / Form-Data" and / or contains The behavior should be taken when the form is.
For example, when the HTML form author wants the user to upload one or more files, he can write: