Greetings, chriswood!
At 28.11.2000, 11:00, you wrote:
cwc> I'm working on a web page template system (PHP/PostgreSQL)
cwc> which will (in part, other stuff is done) allow users to upload a gif or
cwc> jpeg via a form on another site. The image will then slot into a
cwc> predetermined place on their template website.
cwc> I've considered the alternatives (store files in a directory or in the
cwc> db), and I think storing the image files in the database is the way to
cwc> go. Unless anybody can think of why I should just upload the files
cwc> to a directory on the server instead of storing them as BLOBs.
Well, there is one (huge) reason - speed. Besides, current BLOB
support in pgsql is not too good:
1) You can't pg_dump BLOBs,
2) For _each_ BLOB _two_ files are created in database dir.
So, my advice would be to store images in filesystem and to store
paths to them in DB.
--
Yours, Alexey V. Borzov, Webmaster of RDW