That clarifies it for me.  Basically, the gist is that the image does
not have a .cfm extension.  It will have the extension of the
appropriate file type and the use will be none the wiser.

What if I pull a jpg from a database and want to display that image?  I
*must* save the jpg to a physical file, then use CFLOCATION to that
image.  Right now, I just stream the jpg to the browser using a jpg
content type.  No physical file is involved.

I guess it's a trade-off using either method.

M!ke

-----Original Message-----
From: Hugo Ahlenius [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 16, 2005 4:34 PM
To: CF-Talk
Subject: RE: cfcontent vs cflocation

Sorry for not being more clear here, and it was not really a question, I
basically wanted to check if there were any major objections to it.
 
For cases when you have the image lying in a web-accessible directory
(could also be on another server), or when any dynamically created image
(graphing tool, ArcIMS/mapserver, captcha etc) are dropped in a
web-accessible directory, you should do a cflocation rather than a
cfcontent output.
 
That way you can do whatever processing you want before, and hand over
the work to the web-server (doing what it does best - serving static
content), instead of occupying a thread in cfmx with just outputting
something. Not so important for small images, but anyways.
 
Web browsers don't seem to have any problem at all with that (from just
a quick test) -- they happily go through the request and receives the
302 header to the new location, and load+display the image.
 
Another thing: This way you don't have to worry about setting the proper
mime type headers, the web server should do that automatically.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206820
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to