W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2011

[whatwg] Drag-and-drop folders/files support with directory structure using DirectoryEntry

From: Glenn Maynard <glenn@zewt.org>
Date: Tue, 15 Nov 2011 21:06:40 -0500
Message-ID: <CABirCh_Yem2OwvxT7NAxS6FrUAuifOZtyjR+tYxyQWnJ5J3kZQ@mail.gmail.com>
On Tue, Nov 15, 2011 at 8:38 PM, Kinuko Yasuda <kinuko at chromium.org> wrote:

> The async nature of DirectoryEntry makes the code longer,
> but webapps can work on the files incrementally and can show
> progress UI while enumerating.  For the apps that may deal with
> potentially huge folders providing such a scalable (but slightly
> more cumbersome) way sounds reasonable to me.

Entry (and subclasses) should also be supported by structured clone.  That
would allow passing a DirectoryEntry received from file inputs to be passed
to a worker.  This is something for later, of course, but combined with an
API to convert between Entry and EntrySync (and DE/DESync), this would
allow using the much more convenient sync API in a worker, even if the only
way to retrieve the Entry in the first place is in the UI thread.

I think this is a better solution to the inconvenience of async APIs than
falling back to exposing unscalable sync interfaces in the main thread.
This is one of the reasons we have workers.

Glenn Maynard
Received on Tuesday, 15 November 2011 18:06:40 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC