I'm trying to figure out how to store the path to the file that gets uploaded. I tryed passing the path to another form on a different page, but I can only retireve the path to the directory and not completely to the file. <cfset CurrentPage=GetFileFromPath(GetTemplatePath())> <cfoutput> <cfif isdefined("form.upload_now")> <cfset uploadPath = GetDirectoryFromPath(GetTemplatePath()) & "#HELLO.USERID#\"> <cfif not DirectoryExists(uploadPath)> <cfdirectory action="create" directory="#uploadPath#"> </cfif> <cffile accept="image/gif, image/jpeg, image/pjpeg, text/html, application/msword" action="upload" destination="#uploadPath#" filefield="ul_path" nameconflict="makeunique"> The file was successfully uploaded! <a href="savepath.cfm?uploadpath=<cfoutput>#form.ul_path#</cfoutput>">Click here to finnish</a> </cfif> </cfoutput> <form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="upload_form" enctype="multipart/form-data" id="upload_form"> <input type="file" name="ul_path" id="ul_path"> <input type="submit" name="upload_now" value="submit"> <input type="hidden" name="MM_InsertRecord" value="upload_form"> </form> Code (markup):
Use the CFFILE parameters like #CFFILE.ServerFile# #CFFILE.serverDirectory#. They're available after you upload with cffile http://livedocs.adobe.com/coldfusion/7/htmldocs/00000253.htm