I have some code to force the downloading of a file to the client.  It works great but I want to execute some other code before that.  Is it possible?

My code looks like the stuff below and when you run it, it fires immediately.

<cfset filePath = "c:\path\to\file\thefile.ext">
<cfheader name="Content-Disposition" value="attachment; filename=#getFileFromPath(filePath)#">
<cfcontent file="#filePath#" type="application/octet-stream">
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Click Here

Reply via email to