Organization: China Interactive Publishing Network (http://www.china-pub.com/)
RFC Document Chinese Translation Program (http://www.china-pub.com/compters/emook/aboutemook.htm)
E-mail: Ouyang@china-pub.com
Translator: Hujiao HJ_CHINESE@yahoo.com)
Translation time: 2001-4-26
Copyright: This Chinese translation copyright belongs to China Interactive Publishing Network. Can be used for non-commercial use free reprint, but must
Keep the translation and copyright information of this document.
Network Working Group E. NEBEL
REQUEST for Comments: 1867 L. Masinter
Category: EXPERIMENTAL XEROX CORPORATION
NOVEMBER 1995
HTML is based on the form of the form
(RFC1867 FORM-BASED FILE UPLOAD IN HTML)
The state of this memo
This memorando describes a test protocol of an Internet community. This memo does not specify any Internet standard, it needs
It is necessary to further discussions and recommendations for improvement. The release of this memorandum is unrestricted.
table of Contents
1. Abstract 2
2. HTML form 2 with file submission
3. Suggested application 3
3.1 Display of File Components 4
3.2 Submitting Action 4
3.3 Multipart / Form-Data 44
3.4 Explanation of other properties 5
4. Consideration of rearward compatibility 5
5. Other considerations 6
5.1 Compression, Encryption 6
5.2 File Transmission Delay 6
5.3 Other solutions to transfer binary data 7
5.4 Do not modify 7
5.5 Default Type 8
5.6 Allow an action to point to "Mailto:" 8
5.7 Remote file 8 transmitted by third part
5.8 Transfer file 8 with encType = x-www-form-urlencoded
5.9 Put Crlf as a line breakage 8
5.10 and Multipart / Related relationship 9
5.11 Field name with non-ASCII code 9
6. Example 9
7. Multipart / Form-Data registration 10
8. Safety considerations 11
9. Conclusion 11
Author Address: 12
A. Media Type 12 for Multipart / Form-Data
Reference: 13
1. Summary
Currently, HTML forms allow form writers to get information about users of the browsing form via a form. Many need
In applications where users entered, the form proves to be very useful. However, because the HTML form does not provide
This capability is subject to certain limits by the way to upload documents or data. So those who need to get from the user
The service providers of the document have to build the corresponding application. (We can list at WWW-Talk Mail
An example of such a customer browser is found. Since documentation is characterized by many applications, this makes
People require an extended HTML so that information providers can be able to process file upload requests uniformly and upload files.
The response provides a unified MIME-compatible manifestation. This program also includes a strategy for keeping backward compatibility
Shao, so that the new server can interact with the existing HTML client.
This recommendation is independent of the existing version of HTML.
2. HTML form with file submission function
Existing HTML specification defines eight possible values for the INPUT element, named: Checkbox, Hidden, Image, Password, Radio, Reset, Submit, Text. In addition, when the form is adopted
When the POST method, the form default ENCTYPE with "Application / X-WWW-FORM-URLENCODED"
Attributes.
This recommendation has 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 the file type or file format that can be uploaded.
List.
In addition, this recommendation also defines a new MIME type: Multipart / Form-Data, and when processing a
ENCTYPE = "Multipart / Form-Data" and / or the form containing the marked of the should be
The behavior taken.
These changes can be considered completely independent, but these changes are required for reasonable file upload requirements.
For example, when the HTML form author wants the user to upload one or more files, he can write: