On 6/20/08, João Eiras <[EMAIL PROTECTED]> wrote: > Hi > > > > There's a small problem with that too, because we would need a way to > handle file names > > that contained quote marks, which is possible on Mac and Linux, but not on > Windows. > > > Not only that, but in unix flavours, paths are separated with : while > in windows they're separated with ; > In *nix special char are escaped with \ while in windows \ separates > directories in paths. > So IMO, it won't be possible to com up with a solution that is cross > platform without making up something completly new. > I'd suggest for HTMLInputElement to have a .files or .paths property > which would be an array of all the files choosen, names only. >
I like the idea of .files returning an array of just filenames. Great idea! But, if .files is implemented, what should .value return then? Always just the first filename? A separated list of platform-dependent filenames with a separator that makes sense for separating filenames on that platform? Nothing? On a side, I'd like .paths to return a list of file URIs (when I allow it, like for local pages or specific sites). Be nice for building a playlist for scripting media player type plugins or even Audio and Video. That way, you could choose a bunch of files in a different directory than the page and have the paths load in a playlist. (Or, even use a script to convert the file URI to a platform path if the plugin doesn't understand file URIs). Of course, I guess that'd have to be a browser-specific thing and .vendor_paths. Anyway, .files returning an array would be a lot better than trying to parse some platform-specific separated list string that .value might return. -- Michael
