You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Jeff Hinrichs - DM&T <du...@gmail.com> on 2008/07/03 15:13:03 UTC
File Attachments
Can someone point me to the wiki or discussion about how to handle
documents with attached file(s)? I see references to the subject in
various places but have yet to find the "couchdb" way of doing it.
Do I just base64 encode the file contents and save that along with
filetype and other name attrs in a couchdb document? Or is it
preferred to mime-encode like cmlenz does with the dump/load scripts?
I see in the wiki under UriTemplates, the method to download a file
attachment, but that would seem to infer that there is a correct way
to attach a file so that the method [WWW]
http://localhost:5984/dbname/docid/_bin/filename does the right thing.
Also, I've seen mention in the list of a 2GB limit to a database,
however I can't seem to find that in the docs -- is this limit
correct? If it is, are there plans to expand the limit?
Finally, the idea I am toying with is using couchdb to store binary
documents with meta information. Think of something like a blog, but
instead of the post content being text, it would be a binary document
(PDF, OO, etc), the comments would be other binary documents and their
associated meta data. Is couchdb a non-optimal solution or would it
be a good solution? The database would be rather large and constantly
growing -- if couchdb is a good fit, are there limits to database size
that would affect the architecture? partitioning, etc?
This wouldn't be a document revision control system, once an attached
file is stored it won't be changed, although amended documents would
be stored in the "comments" of the original post.
Regards,
Jeff