couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@gmail.com>
Subject Re: Custom fields in attachments
Date Tue, 13 Apr 2010 23:06:42 GMT

On Apr 13, 2010, at 4:03 PM, ericdes wrote:

> Would there be a way to add custom fields in a document's attachment? I'm thinking about
something like this:
> 

You will need to keep them elsewhere in the document, like in a my_attachment_metadata field,
or something.

> {
>  "_id":"html_page_with_images",
>  "_attachments":
>  {
>    "image1.jpg":
>    {
>      "content_type":...,
>      "data":....,
>      "alt":"Image #1",               <== Custom field
>      "title":"Title of the image",   <== Custom field
>    }
>  }
> }
> 
> Eric Desgranges
> eric@vcardprocessor.com


Mime
View raw message