[whatwg] What should the value attribute be for multi-file upload controls in WF2?

On Jun 20, 2008, at 2:44 PM, Lachlan Hunt wrote:
> ...
> In each one, I selected a file named test.txt from within my home or 
> My Documents directory.  These are the vaules returned in each 
> browser:
>
> Windows browsers:
> IE 8:         test.txt
> IE 7 mode:    test.txt
> Firefox 2:    D:\My Documents\test.txt
> Firefox 3:    test.txt
> Opera 9.5:    C:\fake_path\test.txt
> Safari 3.1.1: D:\My Documents\test.txt
>
> Mac browsers:
> Firefox 3:    test.txt
> Opera 9.5:    C:\fake_path\test.txt
> Safari 4 (Developer Preview): /Users/lachlanhunt/test.txt
> ...
> Since Both Firefox 3 and IE 8 only return the file name, and Opera 9.5 
> refuses to return the real path anyway, maybe we should define that 
> when there's only a single file selected, it returns just the file 
> name.
> ...
> -- 
> Lachlan Hunt - Opera Software

If this needs to be standardized for interoperability (though it's not 
clear to me that it does), it might help to know why Opera goes to the 
trouble of providing a fake path, rather than providing just the 
filename as Internet Explorer 7 and Firefox 3 do. Was this needed for 
Web site compatibility?

Even if it doesn't need to be standardized for interoperability, it 
might help improve privacy if the spec advised browsers not to include 
the path. It's not obvious that uploading a file will divulge the path, 
and the path might include information that you'd rather not disclose 
(such as your full name, if you've used it as the name for your home 
folder).

> ...
> But it really depends what use cases we need to address.  Do authors 
> ever actually obtain the file name using JavaScript for anything?  If 
> so, what for?  With multiple file selection, is it likely they would 
> want to inspect each individual file name for anything, in which case, 
> should we find a way to make it easier to obtain individual file 
> names?
> ...

A related issue, that Web Forms 2 also doesn't seem to address: Should 
it be possible to select the same file multiple times in the same 
upload control? (I can imagine use cases for selecting the same file in 
different upload controls on the same page, but none come to mind for 
the same file in the same upload control.)

If it should be possible, but a Web author wants to prevent it in a 
case where only distinct files make sense, should they be able to do 
so? And if so, how? Relying on the browser-provided filename wouldn't 
be reliable when that doesn't include the path.

Cheers
-- 
Matthew Paul Thomas
http://mpt.net.nz/


---AV & Spam Filtering by M+Guardian - Risk Free Email (TM)---

Received on Saturday, 21 June 2008 05:57:27 UTC