Re: New FileAPI Draft | was Re: FileAPI feedback

Nikunj R. Mehta wrote:
> On Aug 5, 2009, at 6:55 PM, Jonas Sicking wrote:
>> What's the use-case for getAsBase64?
> I have another use case for this. The Atom Publishing protocol per RFC 
> 5023 [1] accepts inline binary data represented in base 64 encoding. 
> In order to submit binary inline content in an Atom entry to an Atom 
> server, it would be necessary to getAsBase64()
Specifically, atom:entry can contain Base64-encoded content [2]; I'm not 
sure it allows *other ways* to submit inline binary content.  I suppose 
one reason to keep the ability to get data in Base64 is for legacy 
reasons, since it happens to be a convenient way to get binary stuff 
into web content (and ultimately onto servers).  The problem is that it 
is not as useful within webapps (at least, not as useful as binary 
content).  Use cases submitted till now involve *submitting* binary 
content in Base64 to servers that can handle Base64, but not doing 
anything useful with Base64 *within* the web app (where I suspect the 
first thing someone might do is to convert it to a binary string again).

I suppose one reason to keep it around is if:

1. Web app asks user to pick file
2. File is picked and extracted as Base64
3. Atom "container" with Base64 is submitted via XHR using the Atom 
Publishing Protocol [1].

I'm willing to keep a way to get data as Base64 around for such cases.

-- A*
> Nikunj
> [1]

Received on Tuesday, 18 August 2009 01:01:57 UTC