incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Fetching Attachment Containing Image
Date Mon, 10 Oct 2011 08:53:37 GMT
'http://localhost:5984/executabledb_bre/522_10_1/522_10_1.jpg' will
return the raw bytes of your attachment (*not* base64 encoded) so the
line of code that is corrupting your attachment is
'Replace(Environment.NewLine, "").Replace("\r","").Replace("\0", "")'

http://wiki.apache.org/couchdb/HTTP_Document_API#Standalone_Attachments

B.

On 10 October 2011 09:30, Michael Zedeler <michael@zedeler.dk> wrote:
> Hi Ajay.
>
> On 2011-10-10 09:42, Ajay Pawaskar wrote:
>>
>>             I am trying to fetch a attachment from couch containing
>> image and trying to render it on browser.
>>
>>             I m uploading attachment using futon [SNIP]
>>
>> Hitting http://localhost:5984/executabledb_bre/522_10_1/522_10_1.jpg"
>> from server side code
>
> Try entering http://localhost:5984/executabledb_bre/522_10_1/522_10_1.jpg in
> your browser of choice on the machine running CouchDB, and see what you get.
> If you get the picture that was uploaded, then it is in binary form (which
> is what I'd suspect) and should just be passed through your code without any
> modifications.
> --
> Michael Zedeler
> 70 25 19 99 | LinkedIn <http://dk.linkedin.com/in/mzedeler> | Twitter
> <http://twitter.com/#%21/mzedeler> | Github <https://github.com/mzedeler>
>

Mime
View raw message