incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Binary data [was Bulk CSV import?]
Date Fri, 15 Jan 2010 17:32:34 GMT
On Fri, Jan 15, 2010 at 1:50 AM, Brian Candler <> wrote:
> A couple more thoughts about importing and exporting aggregate batches of
> document-oriented data.
> * A desktop-friendly way to bundle documents is in a ZIP file.
> Unfortunately that's a binary format, and _list/_external use a JSON (UTF-8)
> protocol.
> I see that an _external function can give back base64-encoded binary data:
> I don't think _list or _show can, and in any case you'd need a ZIP library
> written in Javascript.

list and show should be able to return base64 data, to be decoded to
binary before sending to the client. I know there is a test that _show
can serve a favicon.ico file.

but yes, it seems a bit much to do ZIP in JS. maybe not in... 2010!

> Maybe this is too far out of scope for a JS-backed CouchApp. But with
> erlview it makes a lot more sense: you have a binary-clean interface, and
> many libraries available for handling binary formats. e.g.
> * The other option I've tried is MIME multipart documents, but in my testing
> I found that browsers don't handle them well. At best you just get the first
> one saved. I think that option can be discarded.
> Regards,
> Brian.

Chris Anderson

View raw message