Image Uploads - Migrating to new server
Migating to a new server, and getting an error when uploading a new photo. Any help appreciated. Here is my code:
<cffile action="upload" filefield="Photo" destination="#ExpandPath ('../images/temp/')#" nameconflict="MakeUnique">
<cfset Photo = File.ServerFile>
<cfset NEWPHOTONAME = 'VE_' & '#dateformat(now(), 'yyyy_mm_dd_')#' & '#timeformat(now(), 'hh_mm_ss_')#' & '#photo#'>
<cffile action="rename" source ="#ExpandPath ('../images/temp/#photo#')#" destination="#ExpandPath ('../images/original/#NEWPHOTONAME#')#">
<cfset Photo = "#NEWPHOTONAME#">
Server doesn't like the #ExpandPath ('../images/temp/#photo#')# reference.
Error message: The value of the attribute source, which is currently C:/HOSTINGSPACES/virginia/virginiaequestrian.com/wwwroot/images/temp/IMG_2123.JPG, is invalid.
Checking the folder, the file was uploaded to the correct "temp" folder, and is in fact there. Any help appreciated!
