My code takes an uploaded file, resizes it and attempts to save it to another file, from a temp folder to destination folder. I've tried all variations of sample code found online. When the cfimage tag goes to save the resized image, the file disappears from the original location. Then this error is thrown:
d:\temp\imageUploads\HeadshotsampleRDB.jpg (The system cannot find the file specified)
If I change the destination to the final location, the original file reappears!
<cffile
accept="image/gif, image/jpeg, image/jpg, image/pjpeg, image/png, image/xpng, image/x-png"
action="upload"
nameconflict="makeunique"
filefield="newphoto"
destination="d:\temp\imageUploads">
<cfset destFileName = session.Lastname & "_" & CreateUUID() & "." & cffile.serverFileExt>
<cfimage action="info" source="d:\temp\imageUploads\#cffile.serverfile#" structname="info">
<cfif info.width GT 100 OR info.height GT 150>
<cfif info.width GT 100>
<cfset lawyerImage=ImageNew("d:\temp\imageUploads\#cffile.serverfile#")>
<cfset ImageResize(lawyerImage,"100","","highestPerformance",1)>
<cfimage action="write" source="#lawyerImage#" destination="d:\temp\imageUploads\#cffile.serverfile#" overwrite="yes">
<cfelse>
<cfset lawyerImage=ImageNew("d:\temp\imageUploads\#cffile.serverfile#")>
<cfset ImageResize(lawyerImage,"","150","highestPerformance",1)>
<cfimage action="write" source="#lawyerImage#" destination="d:\temp\imageUploads\#cffile.serverfile#" overwrite="yes">
</cfif>
</cfif>
<cffile action="rename"
source="d:\temp\imageUploads\#cffile.serverfile#"
destination="#imgsPath#\photos\#destFileName#">
I could swear I have hot fix 4 installed, I see the file, but the CF Admin only shows us at hot fix level 2.