<cfif button is "download">
<cfif file is "public"><cfset filePath = "c:\Inetpub\<cfelse><cfset filePath = "c:\Inetpub\<cfheader name="Content-Disposition" value="attachment; filename=#getFileFromPath(filePath)#">
<cfcontent file="#filePath#" type="application/octet-stream">
<cfabort>
</cfif>
Once again, here is a block of code that was fine in 4.5, but doesn't work in MX. Honestly, I don't see the advantage to upgrading. Anyway, I have created a button called upload. When it is submitted, it runs this code which should save to either the public file or the file for whichever projectcode was sent. Unfortunately, the file is always saved in the projectcode=41 folder regardedless of which projectcode I send. Any suggestions? Thanks.
<cfif file is "public"><cfset filePath = "c:\Inetpub\<cfelse><cfset filePath = "c:\Inetpub\<cfheader name="Content-Disposition" value="attachment; filename=#getFileFromPath(filePath)#">
<cfcontent file="#filePath#" type="application/octet-stream">
<cfabort>
</cfif>
Once again, here is a block of code that was fine in 4.5, but doesn't work in MX. Honestly, I don't see the advantage to upgrading. Anyway, I have created a button called upload. When it is submitted, it runs this code which should save to either the public file or the file for whichever projectcode was sent. Unfortunately, the file is always saved in the projectcode=41 folder regardedless of which projectcode I send. Any suggestions? Thanks.