Value of <input type=file multiple> should list all files

View: New views
2 Messages — Rating Filter:   Alert me  

Value of <input type=file multiple> should list all files

by Geoff Lankow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

the filename of the first file in the list of selected files
<http://www.w3.org/TR/html5/forms.html#concept-input-type-file-selected>, if
any, or the empty string if the list is empty. On setting, it must throw
an |INVALID_ACCESS_ERR
<http://www.w3.org/TR/html5/infrastructure.html#invalid_access_err>|
exception.

Why only the first file in the list? It can't be for
backwards-compatibility, as the multiple attribute never existed before
this spec. Doesn't it make sense to list all the files?

-Geoff



Re: Value of <input type=file multiple> should list all files

by Anne van Kesteren-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 01 Nov 2009 15:33:15 -0800, Geoff Lankow <geoff@...>  
wrote:

> the filename of the first file in the list of selected files  
> <http://www.w3.org/TR/html5/forms.html#concept-input-type-file-selected>,  
> if any, or the empty string if the list is empty. On setting, it must  
> throw an |INVALID_ACCESS_ERR  
> <http://www.w3.org/TR/html5/infrastructure.html#invalid_access_err>|  
> exception.
>
> Why only the first file in the list? It can't be for  
> backwards-compatibility, as the multiple attribute never existed before  
> this spec. Doesn't it make sense to list all the files?

You can get the file names through <input>.files. Making <input>.value  
more complex as well did not seem worth it.


--
Anne van Kesteren
http://annevankesteren.nl/