Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Joseph Maitino / Joseph Maitino (Joseph Maitino)
Created: 10/01/2013
Components: File Management
Versions: 10.0
Failure Type: Data Loss
Found In Build/Fixed In Build: Final / 287559
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 0
Problem Description:
When using the CFFILE ACTION="APPEND" function and the OUTPUT string is a Binary/PDF variable, the file is completely overwritten.
Steps to Reproduce:
<cffile action="write" addnewline="yes" nameconflict="overwrite" file="{TestFile}" output="THIS IS A TEST">
<cffile action="readbinary" file="{PDF/Binary File}" variable="kcBinary">
<cffile action="append" file="{TestFile}" output="#toBinary(kcBinary)#">
Actual Result:
File is overwritten
Expected Result:
File should appended.
Any Workarounds:
Append the to files in variables, then write as one:
<cffile action="readbinary" file="{TestFIle}" variable="kcHeader">
<cffile action="readbinary" file="{PDF/Binary File}" variable="kcBinary">
<cfset kcBinary=toBinary(toBase64(kcHedr) & toBase64(kcBinary))>
<cffile action="write" addnewline="no" fixnewline="no" file="{TestFile}" output="#kcBinary#">
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3643414
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: jmaitino
External Customer Email:
External Test Config: My Hardware and Environment details:
VMWare
Windows Server 2008 R2 64-Bit
Attachments:
Comments: