Hi All,
I have a script (listed below) that when run allows a file to be downloaded
to a client machine.  In IE 5+ it works great.  However, in NS 6-7 the file
extension .cfm wants to append itself to the end of the file (in this case a
.pdf).  Any way to stop this appending?
===============
<snip>

<cfswitch expression="#URL.p#"><!--- Pick the file to download --->
        <cfcase value="8D00E950-C957-41E2-BC7320004E144EA6"><!--- Ebook --->
        <cfset VARIABLES.FilePath = "#VARIABLES.dlfilepath#"><!--- Full path
to the folder --->
        <cfset VARIABLES.FileName = "ebook1.pdf">
        <cfset VARIABLES.FileType = "unknown">
        <cfset VARIABLES.headervalue = "attachment">
        <cfset VARIABLES.BadType  = "-#FileType#-"><!--- Make an Invalid
Mime Type --->
        </cfcase>
</cfswitch>
                        
<!--- Begin DownLoad File Logic /////  --->
        <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">
<!--- End DownLoad File Logic /////  --->

</snip>
==============
Thanks, Mark 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to