couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Helmberger <sven.helmber...@gmx.de>
Subject Re: Write metadata inside _attachments?
Date Wed, 18 Feb 2009 12:09:18 GMT
Jan Lehnardt wrote:
> 
> 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
> -- 

There is still the problem of attachment identity that is also the root 
of https://issues.apache.org/jira/browse/COUCHDB-217 .

There would be an easy solution if this was implemented you just would 
have to add a "attachment_meta" object to your document that maps the 
attachment revision to its metadata.

Regards,
Sven Helmberger


Mime
View raw message