couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: use cases for attachments?
Date Mon, 22 Aug 2011 11:22:40 GMT
Hi Mike,
I am using that plan for user uploaded docs also.

Best regards,


Sent from mobile

On Aug 22, 2011, at 5:26, Martin Matusiak <> wrote:

> Greetings couchers,
> I have thus far only used couch for storing documents. But I now have
> two cases where attachments seem to be the thing to use and I'd like
> to ask what you think of it.
> The first is translations of user generated content. On a multilingual
> site it occurs to me that one way to handle translations is just to
> have the original document in English and then store clones of it as
> attachments, where all the strings are translated. Does this strike
> you as a good idea? The alternative would be to store them as separate
> documents with a reference to the master document.
> The other case is user uploaded files, which are not for public
> viewing. It would be easier to serve them as plain static files with
> nginx, but since I need an access control it has to go through the web
> app layer somehow, and thus it might as well be stored in the database
> alongside the document to which it logically belongs. Then when a
> request comes in, I do an authorization check, then fetch the file
> from couch and write it into the response, a dynamic sort of download.
> What do you think?
> Thanks,
> Martin

View raw message