[thelist] Images--database or file

Bob Meetin ontheroad at frii.com
Mon Feb 5 07:49:47 CST 2007

path <==> gallery_name

i am using different directory names for different file sizes, sometimes 
i have many versions of a file in different sizes:


i set up a standard upper path that all fit under.  the files are 
associated with the gallery name, not path - might look like 
"/gallery/images/200x150/file_name.png".  200x150 houses both portrait 
and landscape and a p/l field is stored in the database.  i don't know 
how to use blob to get files into the database, so can't comment on how 
well it works - that is another lesson.  security is as Joel said.  also 
to note, when files are uploaded i rename all to lower-case and remove 
spaces.  -Bob

Joel D Canfield wrote:
>> Which way is best, tho?
> er, how 'bout I offer what I do without claiming it's 'best' - files in
> a directory structure, path in the db.
> I prefer it because the files *can* be accessed outside the database
> structure if that's desirable. if not, security lockdown cures that.
> path can be changed, it can be parsed and rebuilt on the fly using UNC,
> local path, web address. db can be copied elsewhere as a reference to
> what's available, without requiring the bigness of storing all the data.
> one downside is that moving/copying the db requires the additional step
> for the directory structure, but I can deal with that.
> joel

More information about the thelist mailing list