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

Jonas Sicking jonas at sicking.cc
Wed Oct 2 13:35:55 PDT 2013

On Wed, Oct 2, 2013 at 11:52 AM, Glenn Maynard <glenn at zewt.org> wrote:
> On Wed, Oct 2, 2013 at 1:02 PM, Jonas Sicking <jonas at sicking.cc> wrote:
>> > That's not the only alternative. For example, a third alternative is
>> > that
>> > the user's selection (e.g. a directory) is returned quickly, not
>> > pre-expanded, and then any uploading happens in the background with the
>> > author script doing the walk and uploading the files.
>> It's unclear to me what you are proposing here. Can you elaborate?
> The same thing I did, I think: an API to navigate the directory tree as
> needed, and to never greedily recursing the directory tree.

Unfortunately that's forbidden by current specs. Or rather, the only
implementation strategy that I can see for doing that while
implementing the current spec would require synchronously traversing
the full directory tree whenever element.files is accessed. At least
to me that would have performance issues that are unacceptable to

Though of course you or anyone else is free to propose changes to the
spec to improve that situation.

/ Jonas

More information about the whatwg mailing list