[whatwg] Forms: <input type=file> and directory tree picking

Glenn Maynard glenn at zewt.org
Tue Oct 1 15:01:54 PDT 2013

On Tue, Oct 1, 2013 at 3:44 PM, Ian Hickson <ian at hixie.ch> wrote:

> > * Websites wants to do their own "pick" UI
> > * OSs can't display pickers which allow picking either a file or a
> directory.
> I don't think I've ever seen a native application on any platform offer
> two buttons, one to pick one or more files, and one to pick one (or more?)
> directories. I think this should be a large red flag. Now if I'm wrong and
> this kind of UI is in fact a thing, then fair enough, but if it's not,
> maybe we should go and study how this problem is solved in native apps.

I can't find any applications off-hand which allow both in the first place,
but Windows doesn't have a dialog that can do both.  Typically you end up
with two separate buttons/menu items, but presented as separate features,
eg."Open File" and "Import Directory".

(Drag and drop doesn't need to make this distinction.  I'm not sure what
should happen if you have a "files" input, and drag a directory into it
that you couldn't have selected with the file picker.)

Glenn Maynard

More information about the whatwg mailing list