couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Hinrichs - DM&T" <dunde...@gmail.com>
Subject Re: [RESULT]: Accept newline patch into CouchDB for 0.9 (Was: Re: VOTE: accept newline patch into CouchDB for 0.9)
Date Wed, 25 Feb 2009 13:07:11 GMT
On Wed, Feb 25, 2009 at 2:48 AM, Brian Candler <B.Candler@pobox.com> wrote:
> On Tue, Feb 24, 2009 at 04:51:08PM -0500, Paul Davis wrote:
>> That hadn't occurred to me. I kinda liked the attachments via
>> multipart mime so i was more forcing everything else into that format.
>> At the moment I can't decide which form I prefer. I definitely see
>> sticking to JSON being easier to parse all around, though.
>
> Even if you could read MIME multipart directly using XHR, to get a document
> complete with its attachments, you'd end up with binary (non-Unicode)
> strings in your Javascript.
>
> Ecma-262 says that Strings don't have to be valid Unicode. However CouchDB
> requires attachment uploads to be base64-encoded. Would I be right to say
> this is because of a JSON restriction, rather than a Javascript one?
>
> CouchDB dodges this at present, since you can't download a document together
> with its attachments.
what about ?attachments=true  or am I misunderstanding you?

>I don't suppose that much attachment processing takes
> place in Javascript anyway; in normal cases the Javascript creates a URL
> from the attachment name, which the user clicks on to download or view the
> attachment, without JS ever seeing the body.
>
> Regards,
>
> Brian.
>
regards,

Jeff Hinrichs

Mime
View raw message