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

Glenn Maynard glenn at zewt.org
Thu Aug 29 15:48:11 PDT 2013


On Thu, Aug 29, 2013 at 5:06 PM, Jonas Sicking <jonas at sicking.cc> wrote:

> >> We don't have to do any enumeration synchronously. It can all happen off
> >> the main thread. The .click() "API" is asynchronous.
> >
> > It's asynchronous to the JS, sure, but at the end of the day the user
> > can't get any work done until it's complete. It's synchronous as far as
> > the user is concerned.
>
> Sure. The alternative is that the user attaches each file separately.
> Which, while means smaller "synchronous" actions, is not really a
> better UX. In other words, synchronousness is not the only design
> constraint here.
>

The alternative is to provide an interface that explores the supplied
directory on-demand, as the page needs it, rather than greedily scanning
the entire directory before giving it to script.  Scanning a large
directory tree in advance is almost never what applications or users want.

A static file list isn't a sensible API for recursively exposing directory
trees.

-- 
Glenn Maynard



More information about the whatwg mailing list