couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From faust 1111 <faust...@gmail.com>
Subject Re: Two kinds of Attachments in doc
Date Thu, 29 Apr 2010 18:11:20 GMT
It's not simple to me,
to get url for attach i must parse _attachments.each.content_type == /^image/



2010/4/29 Randall Leeds <randall.leeds@gmail.com>:
> content_type starts with image/ it's the cover, if it starts with
> audio/ it's the track?
>
> On Thu, Apr 29, 2010 at 10:37, faust 1111 <faust451@gmail.com> wrote:
>> Hi guy's
>>
>> I need modeling this:
>>
>> Audio
>>  has_attachment
>>    cover_img
>>    trac_mp3
>>
>> {
>>  _attachments: {
>>     'super_cover.png': {content_type: ''},
>>     'my_track.mp3': {}
>>  }
>> }
>>
>> how later i can identify, which file is cover and which is track?
>> Now i have only this idea:
>>  store file name in additional field cover_attach_name, trac_attach_name.
>>
>> But may be another way?
>>
>

Mime
View raw message