PDA

View Full Version : ColdFusion - How to get the uploaded file name with CFFILE upload



Brian
June 19th, 2009, 08:32 AM
Here is an example of how to get the upload file's name when using CFFILE upload action:


<cffile action="upload" filefield="form.FileToUpload"
destination="d:\home\your_domain.com\wwwroot\uploads\" nameConflict="makeUnique">

<cfset Uploaded_File_Name = CFFile.ClientFile>

<CFOUTPUT>File: [#Uploaded_File_Name#]</CFOUTPUT>