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

CFCONTENT Saves file twice

Guest
May 07, 2007 May 07, 2007

Copy link to clipboard

Copied

I am encountering a cfheader/cfcontent problem with IE6. When the browser displays the
FILE DOWNLOAD options and OPEN is selected, the file opens with a [1] after the file name
and before the extension. It appears the file has been opened twice.

SAVE file works OK.

The code uses a query getImg, returning a blob object to temp file, then allows download.

<CFSET docname = #ReplaceNoCase(Rtrim(getImg.doc_Name), " ", "_","all")#>

<CFFILE action="WRITE"
file="#GetDirectoryFromPath(GetCurrentTemplatePath())#/#docname#"
output="#toBinary(getImg.blob_obj)#"
addnewline="No">

<CFHEADER NAME="Content-Disposition"
VALUE="attachment; filename=#docname#">

<CFCONTENT type="#getImg.file_desc#"
file="#GetDirectoryFromPath(GetCurrentTemplatePath())#/#docName#"
deletefile="Yes">

TOPICS
Advanced techniques

Views

213

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
Advocate ,
May 08, 2007 May 08, 2007

Copy link to clipboard

Copied

Have you checked your temporary internet files directory to see if the file exists there?

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
Guest
May 08, 2007 May 08, 2007

Copy link to clipboard

Copied

LATEST
Thanks Michael. I cleared my temporary internet files folder and reran the page. I am still getting the [1] added to the filename. I think this is a problem with IE and not the code, because I think I was able to do it with FireFox OK.
It seems it is trying to process the page twice.

I can live with it as is, but I have not been able to pinpoint why it is doing this. I am a novice at CF, though.

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