I am analyzing couchDB at the moment. Is it possible to storage MB worth of data per document? E.g. a JPEG image.
I understand I would need to encode (base64 or something) the said data in order to fit the JSON container.
Practical advice sought please.
As zed said in his comment the best way to do this is using attachments. The Wiki has a section on this: http://wiki.apache.org/couchdb/HTTP_Document_API#Attachments
the basic idea is like so:
You are correct that you should Base64 encode the attachments contents. You can have multiple attachments per document.
NOTE from the wiki: Please note that any base64 data you send has to be on a single line of characters, so pre-process your data to remove any carriage returns and newlines.