W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [File API] Draft for Review

From: Charles Pritchard <chuck@jumis.com>
Date: Fri, 27 Jan 2012 16:15:36 -0800
Message-ID: <4F233E28.407@jumis.com>
To: Arun Ranganathan <aranganathan@mozilla.com>
CC: "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
On 1/27/12 3:58 PM, Arun Ranganathan wrote:
>> On 1/26/12 1:21 PM, Arun Ranganathan wrote:
>
>> Yes, this is nicer. There's no way to create a new File object: I
>> can't
>> set name and lastModifiedDate.
> These can't be done, but there is FileSaver/FileWriter).

It's a minor thing, but there are items like FormData, where the File 
object has more semantics than Blob:  "If you specify a Blob as the data 
to append to the FormData object, the filename that will be reported to 
the server in the 'Content-Disposition' header will vary from browser to 
browser"

FileEntry.file( callback ) will return a new file object, but is quite a 
bit of extra work.


>>> Please review the editor's draft at:
>>> http://dev.w3.org/2006/webapi/FileAPI/
>
>> I want to see the FileSaver (and a new, FileSaverStream) interface
>> moved
>> into the File API.
>
> You mean, you find difficulty in the way they're set up now?  By "moved" you mean you want them part of the same specification?  Why?

The File API Blob constructor obsoletes File Writer BlobBuilder.

The FileWriter and FileWriterSync methods are noted in the File Writer 
API as something that ought to be moved to the File System API.

That only leaves one method, FileSaver. FileSaver only requires the File 
API.

Yes, I'm suggesting that FileSaver should be part of the File API 
specification, and FileWriter should be part of the FileSystem 
specification, then the File Writer API document can be retired.

Microsoft has experimented with window.navigator.msSaveBlob and 
msSaveOrOpenBlob in IE10, as mentioned here:
http://msdn.microsoft.com/en-us/library/ie/hh673542(v=vs.85).aspx
Note that they've included it in the File API section examples.

Google hasn't implemented FileSaver yet, they seem to be waiting for 
consensus:
http://code.google.com/p/chromium/issues/detail?id=65615

With FileSaver and FileSaverStream in the main File API document, I'd 
imagine we could develop quicker and cleaner consensus, and it will be 
easier for developers to understand its use and availability.
Received on Saturday, 28 January 2012 00:16:07 GMT

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