Re: Advice on uploaded files

From: Date: Wed, 29 Jan 2003 00:35:51 +0000
Subject: Re: Advice on uploaded files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133452@lists.php.net to get a copy of this message
on 29/01/03 11:16 AM, Manuel Ochoa (manuel@ochoa-usa.com) wrote: > I writting a php program for a small insurance company and they want to > receive uploaded digital photos. > > Should I store the photos in a mysql database or in a directory on the hard > drive? > > If you have experience with this any advice would be appreciated. I prefer storing them in the filesystem, and using the MySQL database to keep track of WHERE they are (link). There of course are SOME problems with that... mainly because the two are not joined at the hip... someone could accidently trash the file, or the MYSQL record, without deleting the other. Storing the image directly in MySQL has never appealed to me, because you have to do a little more work to get the image out (sending headers, having an image script, etc), and mainly because the size of the DB increases dramatically... which makes backing up more difficult/time consuming. Each to their own though :) Justin

« previous php.general (#133452) next »