FurqanAhmed
Programmer
I programmed a cfm page to allow users to download some text files. The code in this cfm page is
---------------------------------------------------
<cfif IsDefined('Url.Rep') >
<cfset fileName = "C:\Inetpub\ >
<cfheader name="Content-disposition" value="attachment;filename=#fileName#">
<cfcontent type="text/plain" file="#fileName#">
</cfif>
-----------------------------------------------------
it works fine but the download dialog box displays page name in file name filed. Can anyone tell me how to set the name in the "file name" filed to the name of the file that the user is downloading?
Thanks
---------------------------------------------------
<cfif IsDefined('Url.Rep') >
<cfset fileName = "C:\Inetpub\ >
<cfheader name="Content-disposition" value="attachment;filename=#fileName#">
<cfcontent type="text/plain" file="#fileName#">
</cfif>
-----------------------------------------------------
it works fine but the download dialog box displays page name in file name filed. Can anyone tell me how to set the name in the "file name" filed to the name of the file that the user is downloading?
Thanks