Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DDD77039 for ; Mon, 10 Oct 2011 08:53:40 +0000 (UTC) Received: (qmail 44976 invoked by uid 500); 10 Oct 2011 08:53:38 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 44942 invoked by uid 500); 10 Oct 2011 08:53:38 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 44934 invoked by uid 99); 10 Oct 2011 08:53:38 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 08:53:38 +0000 Received: from localhost (HELO mail-iy0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 08:53:38 +0000 Received: by iakc1 with SMTP id c1so5489725iak.11 for ; Mon, 10 Oct 2011 01:53:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.84.207 with SMTP id k15mr3077428ibl.41.1318236817335; Mon, 10 Oct 2011 01:53:37 -0700 (PDT) Received: by 10.231.65.79 with HTTP; Mon, 10 Oct 2011 01:53:37 -0700 (PDT) In-Reply-To: <4E92AD3D.6070009@zedeler.dk> References: <7AC0D97469D66A468B50FA88A9AC4F17BADF2C@genesis_mail.vitalhuber.local> <4E92AD3D.6070009@zedeler.dk> Date: Mon, 10 Oct 2011 09:53:37 +0100 Message-ID: Subject: Re: Fetching Attachment Containing Image From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable '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 wrote: > Hi Ajay. > > On 2011-10-10 09:42, Ajay Pawaskar wrote: >> >> =A0 =A0 =A0 =A0 =A0 =A0 I am trying to fetch a attachment from couch con= taining >> image and trying to render it on browser. >> >> =A0 =A0 =A0 =A0 =A0 =A0 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 g= et. > If you get the picture that was uploaded, then it is in binary form (whic= h > is what I'd suspect) and should just be passed through your code without = any > modifications. > -- > Michael Zedeler > 70 25 19 99 | LinkedIn | Twitter > | Github >