Skip to main content
Inspiring
May 7, 2008
Question

CFHeader question

  • May 7, 2008
  • 1 reply
  • 292 views
Hi,
I'm trying to use <cfheader name="Content-Length" value="57000"> as part of a file download but all I get is an empty file. If I remove the tag it downloads the file correctly. Any suggestions what might be going wrong?

My code
<cfheader name="Content-Length" value="57000">
<cfheader name="Content-Disposition" value="attachment; filename=downloadfile.exe">
<cfcontent file="C:\downloadfile.exe" deletefile="NO" type="APPLICATION/OCTET-STREAM">

I'm running CF8, Apache 2.xx on a Window 2003 server.
This topic has been closed for replies.

1 reply

May 8, 2008
Your value for content length looks a little, shall I say, too rounded. You should use GetFileInfo( path\file.ext).size to find the actual file size in bytes.