W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: File API Feedback

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 30 Jun 2009 01:38:44 -0700
Message-ID: <63df84f0906300138y2c6a6e22tfc11af8fcdde1fbb@mail.gmail.com>
To: Garrett Smith <dhtmlkitchen@gmail.com>
Cc: arun@mozilla.com, Boris Zbarsky <bzbarsky@mit.edu>, Ian Hickson <ian@hixie.ch>, Anne van Kesteren <annevk@opera.com>, WebApps WG <public-webapps@w3.org>
On Mon, Jun 29, 2009 at 11:52 PM, Garrett Smith<dhtmlkitchen@gmail.com> wrote:
> Progress-type Events are useful because the API is asynchronous.
> What if reading the file times out?
>
> If an entire directory is uploaded, as in the Picasa-style example,
> when does the "success" callback fire?
> 1) after all files in "stress" are successfully read
> 2) upon completion of each file
>
> When reading one large file (a movie, for example), how will the
> program provide notification of progress of the upload?

I think you might be misunderstanding the proposed API.

The API simply allows reading files from the local file system (once
the user has elected to grant the page access to a file).

The proposed API is *not* for sending files to a server, for example
in a Picasa-style app. It is expected that XMLHttpRequest Level 2 will
provide that functionality. Since XMLHttpRequest will be used, you'll
have access to the full range of features available in XMLHttpRequest
Level 2, such as ability to monitor progress, error and success.

So, the scope of the current File API draft is limited simply reading
files from the local file system.

With that in mind, do you still think it makes sense to have progress
events and all the other events you are proposing? I agree that using
events are more powerful since it allows us to fire an unlimited
number of different events, and allows pages to register unlimited
numbers of listeners to various events.

However, what is the use case for all this power? I.e. what
application would want to do this? The downside of having all the
power and features of using events is that the syntax becomes more
complex. So we should only do it if it provides features that people
actually need.

/ Jonas
Received on Tuesday, 30 June 2009 08:39:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT