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

Re: [FileAPI] Blob.URN?

From: Robin Berjon <robin@berjon.com>
Date: Thu, 29 Apr 2010 12:00:36 +0200
Cc: Jonas Sicking <jonas@sicking.cc>, "Tab Atkins Jr." <jackalmage@gmail.com>, Darin Fisher <darin@chromium.org>, Michael Nordman <michaeln@google.com>, Web Applications Working Group WG <public-webapps@w3.org>
Message-Id: <0113B0EE-58B4-4B89-B2BD-F4DB9F21E333@berjon.com>
To: Eric Uhrhane <ericu@google.com>
On Apr 29, 2010, at 02:36 , Eric Uhrhane wrote:
> I agree.  Here's what I propose:
> 
> FileWriter is needed for the FileSystem API.  It's not a great match
> for a one-time export of a data Blob from a web app.  I think I should
> take out all the "how do I get a FileWriter" stuff that's in [1],
> replacing it with a note that you just get one from the FileSystem
> API.
> 
> For one-time export of a Blob to a user-selected location, we have
> several attractive options.  We can add a separate API, which can be
> quite simple.  On activation [either by control/button or
> window.saveAs(blob), TBD], it pops up a file selector, saves, and
> reports success/failure.  Alternatively, we can go the blob.url route
> with content-disposition.

+1 for a saveAs() method (though not on window, I'm fairly certain I've seen saveAs() already used in code). Like Jonas I really don't see the appeal of the Content-Disposition approach for this case  just because something can be done using HTTP semantics doesn't mean that it's always the best level at which to expose the functionality to the developer. That being said, so long as the functionality is there, I can live with it.

Jonas scribbled:
> I do think it would be a little sad to give up the use case of using a
> web application to open a file that lives in the users "normal" file
> system, say on the desktop, and editing it in for example google docs.

I don't think that we're giving up, we're just splitting the two uses. We still have a perfectly functional FileWriter, we just need to figure out a way of wiring it in in a way that users can understand. Maybe requiring them to drag files into the mouth of a fire-breathing dragon or something. Or is it possible that an infobar on first write would be sufficient?

> Though admittedly I'm biased because I'm not sold on the whole
> FileSystem API and I don't expect anyone will step up and implement it
> in firefox anytime soon.


Care to elaborate?

-- 
Robin Berjon - http://berjon.com/
Received on Thursday, 29 April 2010 10:01:07 GMT

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