Re: File upload in HTML forms
Mon, 26 Sep 94 08:20 PDT
Larry Masinter writes:
> >>>>> On Sun, 25 Sep 1994 19:23:37 -0700, Paul Burchard <email@example.com> said:
> > I believe file submission is mainly a browser issue -- one should be
> > able to (say) drag-n-drop a file into any TEXTAREA and have the
> > contents POSTed as the field's value. The author of the page cannot
> > (and perhaps should not try to) anticipate in which fields the user
> > might want to place the contents of a file instead of typing by hand.
> While this might be reasonable if you're thinking the submissions as
> mainly text, it isn't reasonable to have a TEXTAREA for uploading a
> postscript file, or audio, or graphics. Nor is it particularly useful if
> the input is allowed to be multiple items.
> In addition, the upload method for large data streams cannot usefully be
> done with "x-urlencoded" or whatever.
Perhaps its time to get more people to support multipart/x-www-form-data
as the submission method? I added this to the emacs-w3 browser as a
template for doing user-defined ENCTYPE attributes for forms. Its
relatively handy, but no servers that I know of support it yet. This went
around www-talk about 2 months ago, not sure who proposed the
x-www-form-data type though.
The basic format is:
POST /cgi-bin/foobar HTTP/1.0
[more http headers]
Content-id: NAME of form <input> tag
the raw form data for the specific <input> tag
Content-id: next NAME
raw form data