Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / February 2005



Tip: Looking for answers? Try searching our database.

Question about CFCONTENT

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
puffbunny - 28 Feb 2005 20:48 GMT
Hello,  Changing the MIME type of a request is easy enough but what about the
filename too?    I have an 'attachment.cfm' page which returns an 'attachment',
a JPG for example... It works fine except as far as the browser knows, the
filename is 'attachment.cfm', not 'image.jpg' (or whatever) which would be
nice..   Anyone know of a trick to do this?  I have seen it done elsewhere...  
Thanks!
blewis - 28 Feb 2005 23:01 GMT
Just change "myFile.jpg" to whatever you want.  

<cfheader name="content-disposition" value="inline;filename=myFile.jpg">
<cfcontent ...>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.