Question
cffile upload
I have the following. I am able to upload and when I look in
the testlibrary, the uploaded file is there, so this part works. I
then wan to retrieve the file, but nothing comes back. My cfoutput
shows blank. What am I doing wrong ?
<cffile action="upload"
filefield="upload_file_name"
destination="d:\inetPub\wwwroot\file_2007\library\TestLibrary\"
nameconflict="makeunique">
<!--- Define the library name --->
<cfset LibraryDirectory = "d:\inetPub\wwwroot\file_2007\library\TestLibrary">
<!---Read the file from the library --->
<cfdirectory
action="list"
directory="#LibraryDirectory#"
name="GetFiles"
filter="*.*"
sort="datelastmodified">
<!--- Perform a loop for each file --->
<cfloop query="getfiles">
<cfoutput>upload file name is #qryGetfile.upload_file_name#</cfoutput>
<cffile action="upload"
filefield="upload_file_name"
destination="d:\inetPub\wwwroot\file_2007\library\TestLibrary\"
nameconflict="makeunique">
<!--- Define the library name --->
<cfset LibraryDirectory = "d:\inetPub\wwwroot\file_2007\library\TestLibrary">
<!---Read the file from the library --->
<cfdirectory
action="list"
directory="#LibraryDirectory#"
name="GetFiles"
filter="*.*"
sort="datelastmodified">
<!--- Perform a loop for each file --->
<cfloop query="getfiles">
<cfoutput>upload file name is #qryGetfile.upload_file_name#</cfoutput>
