CFFILE Question on Railo & Windows servers
I have this code
<cfif len(trim(form.fileUpload))>
<cffile action="upload"
fileField="fileUpload"
destination="#FileDirectory#"
nameconflict="makeunique">
<cfset FileName ="#FORM.lname#_#FORM.file_type#_#FORM.key#">
<cffile action="rename" source="#FileDirectory##cffile.serverfile#" destination="#FileDirectory##variables.filename#-0.#cffile.serverFileExt#" nameconflict="makeunique">
</cfif>
It is code where users upload files and they get uploaded. If there are files with the same name they get renamed and made unique.
For example
Upload 1 = REV-D_166032-0.docx
Upload 2 = REV-D_166032-01.docx
Upload 3 = REV-D_166032-02.docx
I have this on a Railo server and it works fine.
But I have the exact same code on a windows server and it works differently.
It overwrites the existing file. Like this
Upload 1 = REV-D_166032-0.docx
Upload 2 = REV-D_166032-0.docx
Upload 3 = REV-D_166032-0.docx
Is there some server setting on the windows server that I need to change?
Is there some change in the code I need to make?
