Received: from superfly.archi-me-des.de (unknown [62.8.212.177]) by postgresql.org (Postfix) with ESMTP id 7CDF94759A3 for ; Mon, 1 Apr 2002 14:07:11 -0500 (EST) Received: (from frank@localhost) by superfly.archi-me-des.de (8.9.3/8.9.3) id VAA13577; Mon, 1 Apr 2002 21:09:38 +0200 Date: Mon, 1 Apr 2002 21:09:37 +0200 From: Frank Joerdens To: Frank Joerdens Cc: pgsql-php@postgresql.org, adam@archi-me-des.de, linuxkurs@fas-art.com Subject: Re: How to send bytea data straight to browser (as in pg_loreadall)? Message-ID: <20020401210937.B13198@superfly.archi-me-des.de> References: <20020401203101.A13198@superfly.archi-me-des.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In-Reply-To: <20020401203101.A13198@superfly.archi-me-des.de>; from frank@joerdens.de on Mon, Apr 01, 2002 at 08:31:01PM +0200 X-Subliminal-Message: Use Linux! Use Linux! X-Archive-Number: 200204/1 X-Sequence-Number: 1025 On Mon, Apr 01, 2002 at 08:31:01PM +0200, Frank Joerdens wrote: [ . . . ] > understand some crucial point about how this works. How do you present > an image to the browser without actually creating a file for it? The > built in function pg_loreadall appears to do exactly that. I'd need to > replicate that functionality for bytea. An addition: Actually, just echoing the stripcslashed string to the browser works just as with pg_loreadall if I put the script that does the echoing into a teensy little html page as in where show_image.php is just a script that does echo stripcslashes(pg_result($result, 2, image)); (after doing the sql stuff, that is). Which means that I know how to do it without a tmp file. However, I still don't understand the mechanism and I still don't know how to do it in a single script. It appears that you have to provide a file path for the