Received: from strategicnetwork.org (missionreview.com [216.181.207.166]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eASHaXt61318 for ; Tue, 28 Nov 2000 12:36:34 -0500 (EST) (envelope-from justinlong@strategicnetwork.org) Received: (qmail 5065 invoked from network); 28 Nov 2000 17:41:13 -0000 Received: from unknown (HELO JUSTIN) (192.168.0.39) by ns.strategicnetwork.org with SMTP; 28 Nov 2000 17:41:13 -0000 Reply-To: From: "Justin Long" To: Cc: Subject: RE: Question re large objects Date: Tue, 28 Nov 2000 12:35:14 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <3A23B26E.9056.2942B3@localhost> X-Archive-Number: 200011/21 X-Sequence-Number: 29 Point #1: I've heard rumors that BLOBs have been buggy in the past (I'm using 7.0 right now...). Point #2: I would be interested in knowing if you come up with a way to do this. Right now we have a large web site with databases of over 10GB and many image files. We are storing them on a single shared directory on one server as we can't find any way to do what you are saying... Of course, I've never asked anyone for help, either, so kudos for your bravery! :-) Justin Long _________________________________________________________________ Justin Long Network for Strategic Missions 1732 South Park Court Never retreat. Never surrender. Chesapeake, VA 23320, USA Never cut a deal with a dragon. 757-213-2055, ICQ 97269932 http://www.strategicnetwork.org Monday Morning Reality Check: reality-check-subscribe@egroups.com -----Original Message----- From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org]On Behalf Of chriswood@wvda.com Sent: Tuesday, November 28, 2000 12:26 PM To: pgsql-php@postgresql.org Subject: [PHP] Question re large objects (Hopefully I'm addressing this to the right list... This is my first time with BLOBs anywhere.) I'm working on a web page template system (PHP/PostgreSQL) which will (in part, other stuff is done) allow users to upload a gif or jpeg via a form on another site. The image will then slot into a predetermined place on their template website. I've considered the alternatives (store files in a directory or in the db), and I think storing the image files in the database is the way to go. Unless anybody can think of why I should just upload the files to a directory on the server instead of storing them as BLOBs. I can upload a binary file just fine, and retrieve it from the database just fine. The problem is that the file (using pg_loreadall) just plunks itself into my test page as text/plain. How do I get a mime type header associated with this data so my browser will recognize it as a gif or jpeg? Do I have to export the file to a web-accessible directory (owned by web server user, I know) and then use an tag? Or is there a way to get my browser to recognize that the BLOB is in fact an image when PHP pulls it out of the PostgreSQL database? Be gentle if I've asked a stupid question... :-) -------------------------------------------------------- Christopher Wood, Community Access Technical Coordinator Western Valley Development Authority Nova Scotia's Smart Community Box 251 Bridgetown, Nova Scotia B0S 1C0 tel: (902) 665-4083/ fax: (902) 665-2878 www.wvda.com www.wvcn.ns.ca --------------------------------------------------------