W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: New FileAPI Draft | was Re: FileAPI feedback

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 18 Aug 2009 11:55:38 -0700
Message-ID: <63df84f0908181155w34fba18ibb2106f0904bbaa5@mail.gmail.com>
To: arun@mozilla.com
Cc: "Nikunj R. Mehta" <nikunj.mehta@oracle.com>, Web Applications Working Group WG <public-webapps@w3.org>
On Tue, Aug 18, 2009 at 11:25 AM, Arun Ranganathan<arun@mozilla.com> wrote:
> Jonas Sicking wrote:
>>
>>>> There's lots of formats used on the web, I don't think it makes sense
>>>> to add file-getters for all of them. JSON has gotten a lot of
>>>> attention lately, does this mean we should add a getter that return a
>>>> js-style escaped string?
>>>>
>
> I don't really feel very strongly about keeping something equivalent to
> getAsBase64 (whatever the eventual model), but I don't think js-style
> escaped strings are an apples-to-apples comparison to Base64 encoded strings
> for binary content (but I suppose Atom and JSON bear comparison).
>>>>
>>>> We have getAsBinaryString, using that you can get the raw data and
>>>> then base64 or escape encode it, or convert it to whatever format you
>>>> want.
>
> This is true, but not as convenient to programmers.  I think you feel that
> Base64 is one convenience too many, and starts a slippery slope :-)

Yes.

>>> An IETF working group has published standards track proposals for a
>>> format
>>> and a protocol that uses base 64 encoding. If this is not sufficient
>>> reason,
>>> then I am sorry but you have an unduly high expectation. Let the
>>> 'js-style
>>> escaped string' get a similar blessing and then they can bring it to W3C
>>> to
>>> include them in browsers.
>>>
>>
>>
>> shouldn't we also add a base64 encoding function on XMLHttpRequest?
>> the SQL (or other database) API? On postMessage?
>>
>
> Not necessarily (if we consider AtomPub uses cases).

How so? Why would you only want to AtomPub-publish stuff that are read
from files? Rather than read from other websites (think cross-site
XHR), or stored in offline storage, or received through postMessage
from another site? An AtomPub widget that you instantiate in an
<iframe> and to to via postMessage sounds very plausible.

> But again, I *do*
> agree that getAsBinaryString is the bare minimum convenience.  I think
> getting stuff as Base64 is useful syntactic sugar, but can live without it.

Agreed.

/ Jonas
Received on Tuesday, 18 August 2009 18:56:38 GMT

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