couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy M. Shead" <tsh...@sandia.gov>
Subject Re: Accessing attachments from a show function?
Date Mon, 27 Sep 2010 15:05:05 GMT
On 9/26/10 10:24 AM, Chris Anderson wrote:
> On Wed, Sep 22, 2010 at 1:23 PM, Timothy Shead<tshead@sandia.gov>  wrote:
>> Is there any way to access a document's attachments (the actual bytes, not
>> just the attachment metadata) from within a show function?
>>
>
> Sorry, there is not -- the query server isn't sent attachments as that
> would just be too much data for it to process.
>
> I'd be open to a patch to make show function requests respect
> ?attachments=true if anyone wants to work on it.
>
> Chris
>
>> Thanks in advance,
>> Tim
>>
>> --
>> Timothy M. Shead
>> Sandia National Laboratories
>> 1424, Data Analysis and Visualization
>>
>>
>
>
>
Chris:

Thanks for the response, I had tried using ?attachments=true and 
suspected that this was going to be the answer ;)  At this point we've 
got a solution that uses client-side AJAX to accomplish the same thing 
that's "good enough", if it becomes an issue we might experiment with 
using the Python query server to grab attachments.  In this case we have 
a small number of documents, each of which has a large number of very 
large attachments, so the all-or-nothing nature of ?attachments=true 
would be suboptimal.

Cheers,
Tim



-- 
Timothy M. Shead
Sandia National Laboratories
1424, Data Analysis and Visualization


Mime
View raw message