Question
CFFILE question
I am trying to allow users to upload a logo along with some
information.
So, on the form, I have:
<cfform action="CF/addLink.cfm" method="post" preloader="no" lang="en" dir="ltr"
title="test" enctype="multipart/form-data">
Select the type of link you are adding:<br> Club <cfinput type="radio"
name="type" visible="true" checked="true" value="1"> Equpiment vendor/reseller
<cfinput type="radio" name="type" visible="yes" checked="no" value="2"><br>
<table width="95%" border="0">
<tr>
<td>Link Contact Person:</td>
<td><cfinput type="text" name="linkContact" size="25" maxlength="30"></td>
</tr>
<tr>
<td>Club Address:</td>
<td><cfinput type="text" name="linkAddress" size="30" maxlength="40"></td>
</tr>
<tr>
<td>Club City:</td>
<td><cfinput type="text" name="linkCity" size="15" maxlength="20"></td>
</tr>
<tr>
<td>Club State:</td>
<td><cfinput type="text" name="linkStat" size="2" maxlength="2" style="text-transform:uppercase"></td>
</tr>
<tr>
<td>Club Zip:</td>
<td><cfinput type="text" name="linkZip" size="5" maxlength="5"></td>
</tr>
<tr>
<td>Upload a club logo?</td>
<td><cfinput type="file" name="linkLogo"></td>
</tr>
</table>
<p align="center"><cfinput type="submit" name="Submit" value="Submit"></p>
</cfform>
and on the processing page:
<cfparam name="form.linkLogo" default="">
<cfif len(form.linkLogo) gt 1>
<cfset upDir=expandpath("logos")>
<cffile action="upload" filefield="form.linkLogo" destination="#upDir#" nameconflict="makeunique"
mode="777">
</cfif>
The problem is, the file doesn't appear to be uploading, but there isn't
any error either.........
So, on the form, I have:
<cfform action="CF/addLink.cfm" method="post" preloader="no" lang="en" dir="ltr"
title="test" enctype="multipart/form-data">
Select the type of link you are adding:<br> Club <cfinput type="radio"
name="type" visible="true" checked="true" value="1"> Equpiment vendor/reseller
<cfinput type="radio" name="type" visible="yes" checked="no" value="2"><br>
<table width="95%" border="0">
<tr>
<td>Link Contact Person:</td>
<td><cfinput type="text" name="linkContact" size="25" maxlength="30"></td>
</tr>
<tr>
<td>Club Address:</td>
<td><cfinput type="text" name="linkAddress" size="30" maxlength="40"></td>
</tr>
<tr>
<td>Club City:</td>
<td><cfinput type="text" name="linkCity" size="15" maxlength="20"></td>
</tr>
<tr>
<td>Club State:</td>
<td><cfinput type="text" name="linkStat" size="2" maxlength="2" style="text-transform:uppercase"></td>
</tr>
<tr>
<td>Club Zip:</td>
<td><cfinput type="text" name="linkZip" size="5" maxlength="5"></td>
</tr>
<tr>
<td>Upload a club logo?</td>
<td><cfinput type="file" name="linkLogo"></td>
</tr>
</table>
<p align="center"><cfinput type="submit" name="Submit" value="Submit"></p>
</cfform>
and on the processing page:
<cfparam name="form.linkLogo" default="">
<cfif len(form.linkLogo) gt 1>
<cfset upDir=expandpath("logos")>
<cffile action="upload" filefield="form.linkLogo" destination="#upDir#" nameconflict="makeunique"
mode="777">
</cfif>
The problem is, the file doesn't appear to be uploading, but there isn't
any error either.........
