On May 19, 2004, at 1:19 PM, David Blomstrom wrote:
All "conventional wisdom" I've ever come across for
this type of
application is that there's no advantage to keeping
the image in the db
itself. Just keep them as files on the server, store
a filename &/or
location in the db if necessary, and use your
middleware to display the
images. Its faster, easier to maintain, and easier
to backup. IMO,
storing images in the db just bloats the file and
complicates all the
backup issues.

On Wed, 19 May 2004, David Blomstrom wrote: That's the advice I wanted to hear; one less thing for me to learn. :)

Thanks.


On May 19, 2004, at 2:19 PM, jabbott wrote:

I have an application where I serve out blobs. I store the PDF files in blob fields for two reasons.

1. I want to make an interface where staff can upload pdf's into the server but not actually give them access to the server. I use my code to maintain the security of who gets to write to what.

Middleware should be able to control that.

2. The pdf's are date sensitive press releases and public notices. They must show up on our web site on a certain date and they MUST not be able to be accessed on our site after that time. Having them stored as blobs I use a cfm page to fetch them out of the database and it is easy for me to write the sql to ~WHERE date < or date >" If they were on the file system someone could have bookmarked the location of the pdf and unless I have something written to go in and prune files out, it could still be gotten.

Again, middleware ought to be able to control this a few different ways. One is to use a protected file area to which a server side process has privileged access to, then passed the file to the user for download. Your app determines whether the current web visitor can trigger the script that delivers the file. The file can't be bookmarked. Another method is to change the name as the file is delivered, so that the file received by the user doesn't even match the one on the server.


Anyway, I'm sure there's legit uses for storing web resources in BLOBs, but so far I've never seen an advantage over use server config and the web app itself (not that I've made any monster apps mind you, all of mine have been simple enough for single or dual server setup).

-- greg willits


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to