1 Reply Latest reply on Jan 23, 2012 1:06 PM by BKBK

    How to set destination for <cffile>

    Ali Parsa

      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

       

      so :

       

      <cfset file_name="demo.jpg">

      <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 .