Answered
CFContent - works sometimes, sometimes not.
CFContent has always been tragically clunky (Send flames to
NULL@alienetworks.com); why is this so hard to get right? Here's
the relevent code excerpt from the app I have that works
everywhere:
<CFHeader
Name = "content-disposition"
Value = "inline; filename=#pcFileName#"/>
<CFContent
Type = "application/octet-stream"
deleteFile = "no"
File = "#filePath#\#pcFileName#"
Reset = "yes">
...this works fine with any browser we've tried, and is currently serving product to both PC's and Mac's. No problems. On the same box, I also have an application that has this:
<CFHeader Name = "content-disposition" Value = "inline; filename=#theSaveName#">
<CFContent Type = "application/octet-stream" deleteFile = "no" File = "#theSourceFile#" Reset = "yes">
...this works fine with Opera, but not with IE. IE grinds for a moment, and then says:
'Internet Explorer cannot download / from xxxxx.alienetworks.com.'
'Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.'
Yes, the paths are correct. No, permissions aren't an issue (it works in Opera, remember?). The directory name is diferent, but even with the same test file (a zip file), I get the same results. I've tried both inline and attachment, and I've tried hardcoding the MIME type and letting the server determine it with getPageContext().getServletContext().getMimeType(theSourceFile). I've also tried both a clean URL and the old ' http://qwe.qweqweqwe.com/template.cfm/sourcefile.zip' trick.
Thanks!
<CFHeader
Name = "content-disposition"
Value = "inline; filename=#pcFileName#"/>
<CFContent
Type = "application/octet-stream"
deleteFile = "no"
File = "#filePath#\#pcFileName#"
Reset = "yes">
...this works fine with any browser we've tried, and is currently serving product to both PC's and Mac's. No problems. On the same box, I also have an application that has this:
<CFHeader Name = "content-disposition" Value = "inline; filename=#theSaveName#">
<CFContent Type = "application/octet-stream" deleteFile = "no" File = "#theSourceFile#" Reset = "yes">
...this works fine with Opera, but not with IE. IE grinds for a moment, and then says:
'Internet Explorer cannot download / from xxxxx.alienetworks.com.'
'Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.'
Yes, the paths are correct. No, permissions aren't an issue (it works in Opera, remember?). The directory name is diferent, but even with the same test file (a zip file), I get the same results. I've tried both inline and attachment, and I've tried hardcoding the MIME type and letting the server determine it with getPageContext().getServletContext().getMimeType(theSourceFile). I've also tried both a clean URL and the old ' http://qwe.qweqweqwe.com/template.cfm/sourcefile.zip' trick.
Thanks!
