W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: Form fields for uploading

From: Elliott Sprehn <esprehn@gmail.com>
Date: Mon, 2 Apr 2007 13:08:07 -0400
Message-Id: <2BA9BF90-3712-485A-8AD7-37E952885DC3@gmail.com>
Cc: public-html@w3.org
To: Alexander Graf <a.graf@aetherworld.org>

On Apr 2, 2007, at 11:48 AM, Alexander Graf wrote:

>
> Just a general idea that came to my mind a few days ago when i was  
> working on
> a custom cms solution.
>
> File upload fields are very, very broken right now. They should be  
> modified to allow
> for:
>
> 	1) Drag and Drop of files to the upload field

This seems very implementation specific and would not apply for  
mobile devices or other UAs that have no drag feature. Certainly a  
good idea for implementors to add this functionality though.

> 	2) Uploading of multiple files

I think this is a good idea. Interestingly the current HTML4 spec  
states:

"This control type allows the user to select *files* so that their  
contents may be submitted with a form. The INPUT element is used to  
create a file select control." (emphasis added by me)

Which seems to imply that it can be used for more than one file,  
though I don't know of any implementors that interpret it this way.

> 	3) Setting the file type to upload

Definitely would be a good idea. If attributes such as "format" are  
being suggested for <input> elements it seems only natural that file  
inputs should have an attribute for mime.

> 	4) Uploading/selecting of whole folders

This again seems very implementation specific. What format should the  
uploaded folder be sent in? Currently HTTP doesn't really have a  
protocol (that I know of) for sending folders. We could specify that  
the files should be archived, but in what format?

> 	5) if possible, let the author read (DOM/JS) the number of files that
> 	were selected for uploading, their filenames/paths and their size.
>

The file name and the size would definitely be helpful, but I'm not  
sure we should expose the path to the file on the DOM. To me it feels  
like its outside the responsibilities of the browser because the  
server would not normally be given this information when the file was  
uploaded.

- Elliott
Received on Monday, 2 April 2007 17:08:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:42 UTC