I have an acrobat file 900K which I want to automatically start a download
to a client machine when a person clicks a link.  Through v6.0 of CFMX, the
code listed below worked great for both IE 6 and NS6 & 7.  Now, it seems
like since I've upgrade to CFMX 6.1 on the server, the file downloaded is 0
bytes in size, and acrobat throws an error.
I've checked and rechecked the pdf, and testing by ftp-ing it back and forth
between the server and a couple of client machines, I get the full 900k
document and can open the pdf ok.  I saw something in the docs about changes
in 6.1 in <cfsetting enablecfoutput>, but changing that didn't solve the
problem.

Help.

-=============================

<cfset VARIABLES.FilePath = "c:\inetpub\mysite\myfolder\_files\">
<cfset VARIABLES.FileName = "AGoodRead.pdf">
<cfset VARIABLES.FileType = "unknown">
<cfset VARIABLES.headervalue = "attachment">
<cfset VARIABLES.BadType  = "-#FileType#-"> <!--- Make an Invalid Mime Type
--->
                                        
<cfsetting EnableCFOutputOnly="yes">
                                                                        
<cfif ReFind("MSIE",cgi.HTTP_USER_AGENT)>
        <cfheader name="Content-type" value="#VARIABLES.BadType#">
        <cfheader name="Content-Disposition" value="#VARIABLES.headervalue#;
filename=#VARIABLES.FileName#">
        <cfcontent type="#VARIABLES.BadType#"
file="#VARIABLES.FilePath##VARIABLES.FileName#">        
<cfelse>
        <cfheader name="Content-type" value="#VARIABLES.FileType#">
        <cfheader name="Content-Disposition" value="#VARIABLES.headervalue#;
filename=#VARIABLES.FileName#">
        <cfcontent type="#VARIABLES.FileType#"
file="#VARIABLES.FilePath##VARIABLES.FileName#">
</cfif>
                                                                        
<cfsetting EnableCFOutputOnly="no">     

==============================

Thanks, Mark 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to