Store the image in the database - if it makes sense. For example I've got a
database of artists, I store images for those artists in the DB (some images
are appropriate to multiple artists, etc). This simplifies back-up
processes and keeps data together.
However on the web side you should, for performance, not be constantly
pulling this information from the DB, it's slow and wasteful. So what I do
is check the DB for the image(s) and then check the file-system - if the
image doesn't exist I place a cached copy of the image on the file-system
and call it from there.
This helps quite a bit with clustered web-servers since the data is kept and
updated in one place but the servers are able to self-update.
The cache is slightly slower than keeping a file reference on the DB (since
you must always check the file existence) but it's not really noticeable
after the image has been cached.
Just my opinion.
Jim Davis
_____
From: Philip Arnold [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 1:22 PM
To: CF-Talk
Subject: RE: How do you store a image
> How can I store a image binary file in a database.
>
> I want to upload a image and place the actual jog in a MySQL
> database. Can this be done? if so what steps would I take.
If you're wanting to present the images to users, you shouldn't
The reason is that by the time you've read the image, then used
CFCONTENT to put the image out, you're wasting database access and CF
access just to display something that should be stored as a file and let
the web server pass to the user
You're trying to add weight to your services that is completely
unnecessary
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

