Re: File* Specifications | Status and some Promises

2013-08-20 Thread Anne van Kesteren
On Thu, Aug 15, 2013 at 6:49 PM, Arun Ranganathan a...@mozilla.com wrote:
 ii. A new static method on URL called URL.createAndRevoke has been added that 
 gets defaults right, and does away with autoRevoke, which nobody implemented 
 for URL.createObjectURL.

My problem with these names is that they suggest you get a URL object
whereas you actually get a string. They also seem longish. I suggest
we name the revoking variant just create or a synonym that has less
of a suggestion of creating a URL object.


-- 
http://annevankesteren.nl/



Re: File* Specifications | Status and some Promises

2013-08-20 Thread Arun Ranganathan

On Aug 20, 2013, at 8:58 AM, Anne van Kesteren wrote:

 On Thu, Aug 15, 2013 at 6:49 PM, Arun Ranganathan a...@mozilla.com wrote:
 ii. A new static method on URL called URL.createAndRevoke has been added 
 that gets defaults right, and does away with autoRevoke, which nobody 
 implemented for URL.createObjectURL.
 
 My problem with these names is that they suggest you get a URL object
 whereas you actually get a string. They also seem longish. I suggest
 we name the revoking variant just create or a synonym that has less
 of a suggestion of creating a URL object.


I agree, and got the same feedback in off-list correspondence.

The ship has already sailed on URL.createObjectURL unfortunately, but we can 
get the newer function's name right.  Jonas proposes URL.createFor in lieu of 
URL.createAndRevoke.

-- A*

 
 
 -- 
 http://annevankesteren.nl/




File* Specifications | Status and some Promises

2013-08-15 Thread Arun Ranganathan
Greetings WG,

There are three moving proposals in the File* arena, and I thought I'd catpure 
what these are and what the status of these are.

1. The File API, currently updated as editor's draft at 
http://dev.w3.org/2006/webapi/FileAPI/

Review strongly encouraged :)  Notable fixes are:

i. A File constructor has been added, which has been a longstanding request.
ii. A new static method on URL called URL.createAndRevoke has been added that 
gets defaults right, and does away with autoRevoke, which nobody implemented 
for URL.createObjectURL.
iii. A Blob URL Store and a Revocation List, useful for URL Fetch (see 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17765).

This draft should be ready for LC and should be considered the File API v1.  

2. Re-writing File APi to be Promises based, which should be considered a v2.  
The biggest departure from the current state of technology here would really be 
that we can have Promises right off the Blob itself, which is zeitgeist 
thinking about these things (and admittedly makes life easier than an 
XHR-inspired FileReader, which will be made legacy).  The best stab at a 
strawperson was this one by Jonas:

http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0727.html

But Stream itself temporarily lives here without too much implementation 
backbone: https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm

I think we *should* have a Promises-based File API off of Blob, but I'm not 
totally sure about the Stream API as it is currently written; I'm amenable to 
editing the File API v2 portion, modulo our proposal for Stream. 

3. Then there's the FileSystem API, currently discussed here: 
http://lists.w3.org/Archives/Public/public-script-coord/2013JulSep/0379.html

This was the upshot of discussions on this listserv, as well as internally at 
Mozilla.  I'm amenable to editing this, which is separate but related to 1. and 
2.

-- A*