Hi,
        Thank you guys, you were right data I was getting is in binary format. 
Now I can render the images.
        

No trees were killed in sending this message; 
however, a large number of electrons were
terribly inconvenienced...
 
Thanks,
Ajay J. Pawaskar

-----Original Message-----
From: Robert Newson [mailto:[email protected]] 
Sent: Monday, October 10, 2011 2:24 PM
To: [email protected]
Subject: Re: Fetching Attachment Containing Image

'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 <[email protected]> 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>
>

Reply via email to