Dear all ,
I have a problem with <cffile> :
my CFM file is in : http://www.demo.com/panel/upload.cfm
i want to store the file in http://demo.com/gallery/news folder
<cffile nameconflict="overwrite" action = "upload" fileField = "n_file" destination = "../gallery/news/#file_name#">
but i get error and i can not save it. i ask my friend and he told me should use full destination path lik "c:\website\demo.com\www\gallery\new" . is it currect ? and if yes , how can i get the server web folder path , because its not fix in all the server and may be different in any server , also i use the MacOX and file system is not same as windows .
You are almost there. The destination should be an absolute path to the directory in which the uploaded file will be stored.
<cffile nameconflict="overwrite" action = "upload" fileField = "n_file" destination = "#expandPath('..\gallery\news')#">