I've done this before...  I eventually figured out that the server's file
system is much, much, much better suited for managing image files than the
database.  I suggest you use CFFILE to copy your images to the server and
simply store the path to them in the DB.  Once that is done you can use
<CFCONTENT type="" file=""> to display.

                                                    
Bryan Love ACP
Internet Application Developer
Telecommunication Systems Inc.
[EMAIL PROTECTED]
                                                    


-----Original Message-----
From: Carlisle, Eric [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 04, 2001 5:48 AM
To: CF-Talk
Subject: Displaying an image with CFcontent


I'm trying to pull an image out on a database and display it without writing
a file to the disk.  I tried this...

<cfcontent type="image/jpeg">
<cfoutput>#toBinary(Base64imageFromDatabase)#</cfoutput>


And, of course, cfoutput won't let me do this because it wants a string, not
a binary value.  I could write the file to the disk, then display and delete
it (using cffile then cfcontent for the last 2 steps).  I'd like to cut
those steps out, though.  All those disk writes effect the performance of
this application.  Is there any way I can go from the database to CFContent?

        Thanks,

        EC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to