couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: Write metadata inside _attachments?
Date Wed, 18 Feb 2009 10:00:56 GMT

On 18 Feb 2009, at 10:45, Sho Fukamachi wrote:

> Hi Couchists,
>
> Having in some cases multiple attachments per document, I would like  
> to be able to store some metadata next to each attachment - the  
> width/height of a picture, for example, or the bitrate of an mp3.  
> Obviously it would be nice if I could do it in the same place as the  
> MIME type, byte size, etc. However, I can't find any way to get data  
> in there.
>
> Is this possible / desirable / should I be doing something else?

This is not currently possible but I think this sounds interesting.
It came up with CouchApp where we want to store checksums
with the files (although this feature is no longer needed with per-
attachment ETags). hmm. I'm worrying a bit about the underlying
data storage changes. This would effectively a document within
a document and I don't know how flexible the attachment meta
data store is.

CouchApp solves this now by maintaining a mirrored sub-object
in the main document that it syncs with the _attachments structure.
While not really neat, it can be fully automated and put into a library.

Can you open a issue on JIRA for this so we can discuss this
on dev@?

https://issues.apache.org/jira/browse/COUCHDB

Cheers
Jan
--


Mime
View raw message