• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFHeader question

Explorer ,
May 07, 2008 May 07, 2008

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

268

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 08, 2008 May 08, 2008

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation