2 Replies Latest reply on May 8, 2007 11:51 AM by coastercam

    CFCONTENT Saves file twice

    coastercam
      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">