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

File API, Editor's Draft II

From: Arun Ranganathan <arun@mozilla.com>
Date: Thu, 11 Jun 2009 03:34:32 -0700
Message-ID: <4A30DDB8.4010400@mozilla.com>
To: public-webapps <public-webapps@w3.org>
I'd like review on the most recent draft of the File API (renamed from 
"FileUpload API") [1].  There's been a great deal of interest in the 
File API from different quarters[2], and I look forward to feedback on 
how to represent file lists, file objects (and accessors), file 
selection dialogs, and file errors.   A few issues and considerations:

1. File data APIs behave asynchronously, which was initial feedback.  
This specification only defines two data accessor methods, but I note 
that asynchronous callbacks seem like they may proliferate, especially 
for error handling.  I'm not sure we can totally avoid this, except to 
be as economical as possible.

2. It continues to be useful to have a mechanism to programmatically 
spawn a file picker, in addition to the HTML input type="file" 
mechanism.  Well known web applications are using Flash to do this, and 
it would be nice if this capability was part of the open web platform.  
This mechanism can be used to prompt for "on they fly" file generation 
by hardware-resident capabilities such as a device's camera.  I've 
specified this in my editor's draft [1] and think it could be 
implemented as a property on the window object, but I'm interested to 
hear opinions about whether it should be something with a constructor, 
*and* whether other user agent organizations think this should be a 
feature mitigated with a user interaction layer, which blocks by default 
till the user grants permission.  This also behaves asynchronously, and 
adds to the issue in 1. 

3. I'd like discussion of FileError objects.  We may need multiple error 
interfaces, or at least more nuanced error codes.  In particular, I'd 
like commentary on security considerations mentioned in the spec.

A few things in my latest editor's draft [1]aren't done, but it's ready 
for feedback.

-- A*
[1] http://dev.w3.org/2006/webapi/FileUpload/publish/FileAPI.xhtml
Received on Thursday, 11 June 2009 10:35:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:54 UTC