W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2013

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

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 2 Oct 2013 20:51:27 -0500
Message-ID: <CABirCh_FODf7Qr+Gwc6LBy5Fwy48_pNWNdt7Wy3BvUcCw8dOPQ@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: WHAT Working Group <whatwg@lists.whatwg.org>, Jonathan Watt <jwatt@jwatt.org>, Ian Hickson <ian@hixie.ch>
On Wed, Oct 2, 2013 at 7:48 PM, Jonas Sicking <jonas@sicking.cc> wrote:

> Proposals for filesystem is just part of what we need. We also need a way
>
to expose it through HtMLInputElement. And a way to allow not exposing the
> files through .files.
>

Assuming for now that we need separate modes for files and directories, I'd
suggest <input type=directory>, which causes a directory picker to be
shown, doesn't populate .files at all, and adds an API entry point to
retrieve a filesystem.  If somebody suggests an implementable way to expose
UI that doesn't need to separate files and directories then we may want
something else, but that doesn't seem likely to me.

(Implementations could still allow selecting individual files, or groups of
files, as long as it's exposed transparently as if they're files in a
directory.  So, something like type=filesystem might be a better name.)

Actually, a filesystem might not even be needed. We could just expose an
> asynchronous iterator.
>

A use case is an image viewer for photographers, allowing the user to open
a directory possibly containing tens of thousands of files.  The image
viewer should be able to allow the user to navigate through directories.
 An iterator couldn't do that--it could only grab the files in the order
they happen to come in.  Also, if the page already knows that the last
image the user viewed is "2013/sunset.jpg", and the user opens the same
directory, the page should be able to grab the same file by its filename
immediately if it still exists, without having to iterate.

Again, and with extra oomph,  proposals welcome.
>

I'd need to review the threads first, but I'll try to get to that and see
if I have any new suggestions.  The last thing I remember is movement away
from the Filesystem API, and a lighter API being proposed, but I don't
recall where that left off.

-- 
Glenn Maynard
Received on Thursday, 3 October 2013 01:51:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:11 UTC