PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|RFC|rfc1867.txt =

page 1 of 8









Network Working Group                                           E. Nebel
Request For Comments: 1867                                   L. Masinter
Category: Experimental                                 Xerox Corporation
                                                           November 1995


                     Form-based File Upload in HTML

Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  This memo does not specify an Internet standard of any
   kind.  Discussion and suggestions for improvement are requested.
   Distribution of this memo is unlimited.

1. Abstract

   Currently, HTML forms allow the producer of the form to request
   information from the user reading the form.  These forms have proven
   useful in a wide variety of applications in which input from the user
   is necessary.  However, this capability is limited because HTML forms
   don't provide a way to ask the user to submit files of data.  Service
   providers who need to get files from the user have had to implement
   custom user applications.  (Examples of these custom browsers have
   appeared on the www-talk mailing list.)  Since file-upload is a
   feature that will benefit many applications, this proposes an
   extension to HTML to allow information providers to express file
   upload requests uniformly, and a MIME compatible representation for
   file upload responses.  This also includes a description of a
   backward compatibility strategy that allows new servers to interact
   with the current HTML user agents.

   The proposal is independent of which version of HTML it becomes a
   part.

2.  HTML forms with file submission

   The current HTML specification defines eight possible values for the
   attribute TYPE of an INPUT element: CHECKBOX, HIDDEN, IMAGE,
   PASSWORD, RADIO, RESET, SUBMIT, TEXT.

   In addition, it defines the default ENCTYPE attribute of the FORM
   element using the POST METHOD to have the default value
   "application/x-www-form-urlencoded".








 
RFC 1867             Form-based File Upload in HTML        November 1995


   This proposal makes two changes to HTML:

   1) Add a FILE option for the TYPE attribute of INPUT.
   2) Allow an ACCEPT attribute for INPUT tag, which is a list of
      media types or type patterns allowed for the input.

   In addition, it defines a new MIME media type, multipart/form-data,
   and specifies the behavior of HTML user agents when interpreting a
   form with ENCTYPE="multipart/form-data" and/or <INPUT type="file">
   tags.

   These changes might be considered independently, but are all
   necessary for reasonable file upload.

   The author of an HTML form who wants to request one or more files
   from a user would write (for example):

    <FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>

    File to process: <INPUT NAME="userfile1" TYPE="file">

    <INPUT TYPE="submit" VALUE="Send File">

    

   The change to the HTML DTD is to add one item to the entity
   "InputType". In addition, it is proposed that the INPUT tag have an
   ACCEPT attribute, which is a list of comma-separated media types.

  ... (other elements) ...

  <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX |
                         RADIO | SUBMIT | RESET |
                         IMAGE | HIDDEN | FILE )">
  <!ELEMENT INPUT - 0 EMPTY>
  <!ATTLIST INPUT
          TYPE %InputType TEXT
          NAME CDATA #IMPLIED  -- required for all but submit and reset
=1=

= PAGE 1 = NEXT > |2|3|4|5|6|7|8

UP TO ROOT | UP TO DIR

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.034497 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)