You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by ericdes <er...@vcardprocessor.com> on 2010/04/14 01:03:57 UTC
Custom fields in attachments
Would there be a way to add custom fields in a document's attachment?
I'm thinking about something like this:
{
"_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
Re: Custom fields in attachments
Posted by J Chris Anderson <jc...@gmail.com>.
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