the below code is for the FTP template. it works fine to display files from the "Download" dir from ftp server, but when I click on a file that I want to download, the error default page of the web browser appear saying page can't be displayed...
How can I download a file from this cfftp template?
many thanks
<CFFTP CONNECTION= "Connection"
USERNAME="user1"
PASSWORD="user1"
Server="ftp.ftpserver.com"
ACTION="Open"
STOPONERROR="Yes">
<!--- get dir info --->
<cfftp connection = "Connection"
ACTION="ListDir"
DIRECTORY="Download"
NAME="DirList"
STOPONERROR="Yes">
<Table border = 0 cellspacing = 3 width="100%">
<tr valign=top>
<td width ="50%"><Strong>Path/name</strong></td>
<td width="25%"><strong>Size</strong></td>
<td width = "25%"><strong>Last Modified</strong></td>
</tr>
<cfoutput query="DirList">
<tr Valign=top>
<td width=50%>
<cfif IsDirectory>
#Name#/
<cfelse>
<a href="#URL#">#Name#</a>
</cfif>
</td>
<td width="25%">#Length#</td>
<td width="25%">#DateFormat(LastModified)#</td>
</tr>
</cfoutput>
</table
How can I download a file from this cfftp template?
many thanks
<CFFTP CONNECTION= "Connection"
USERNAME="user1"
PASSWORD="user1"
Server="ftp.ftpserver.com"
ACTION="Open"
STOPONERROR="Yes">
<!--- get dir info --->
<cfftp connection = "Connection"
ACTION="ListDir"
DIRECTORY="Download"
NAME="DirList"
STOPONERROR="Yes">
<Table border = 0 cellspacing = 3 width="100%">
<tr valign=top>
<td width ="50%"><Strong>Path/name</strong></td>
<td width="25%"><strong>Size</strong></td>
<td width = "25%"><strong>Last Modified</strong></td>
</tr>
<cfoutput query="DirList">
<tr Valign=top>
<td width=50%>
<cfif IsDirectory>
#Name#/
<cfelse>
<a href="#URL#">#Name#</a>
</cfif>
</td>
<td width="25%">#Length#</td>
<td width="25%">#DateFormat(LastModified)#</td>
</tr>
</cfoutput>
</table