Hey :)
Yup...thought that was it at first, but I set that and it still gives
the same error. It's very weird.
Here is all the code:
The Form:
<form action="postresume.cfm" METHOD="post" name="postresume"
enctype="multipart/form-data" >
<table width="80%" border="0"
align="center" cellspacing="5">
<tr>
<td bgcolor="#999999"><strong>First
Name</strong></td>
<td><input name="fname" type="text"
id="fname"></td>
</tr>
<tr>
<td bgcolor="#999999"><strong>Last
Name</strong></td>
<td><input name="lname" type="text"
id="lname"></td>
</tr>
<tr>
<td bgcolor="#999999"><strong>Email
Contact</strong></td>
<td><input name="email" type="text"
id="email"></td>
</tr>
<tr>
<td bgcolor="#999999"><strong>Resume File(Word
doc)</strong></td>
<td><input name="rfile" type="file" ></td>
</tr>
<tr>
<td bgcolor="#999999"> </td>
<td><input type="submit" name="Submit"
value="Submit">
<input type="reset" name="Submit2"
value="Reset"></td>
</tr>
</table>
</form>
The processing Code:
<CFIF IsDefined("form.rfile") AND Len(#form.rfile#)>
<CFTRANSACTION> <!--- If any part of the process fails, cancel
the entire process --->
<!--- Process file upload --->
<CFFILE action="upload" filefield="form.rfile"
destination="e:\webs\theenergyguide\resumes\"
nameconflict="makeunique">
<CFIF cffile.filewassaved ><!--- if
cffile.filewassaved is true --->
<!--- Insert data into database
including the new filename for the word document--->
<CFQUERY name="insertresume"
datasource="eguide">
INSERT INTO
tblResume(fname,lname,email,rfile)
VALUES
('#form.fname#','#form.lname#','#form.email#',#cffile.serverfile#)
</CFQUERY>
<CFELSE>
An error occurred while saving your
resume. Please try again
<CFABORT>
</CFIF>
</CFTRANSACTION>
</CFIF>
And the error again:
And this is the error I get:
----------------
The form field "FILE" did not contain a file.
The Error Occurred in E:\webs\theenergyguide\postresume.cfm: line 9
7 : <CFTRANSACTION> <!--- If any part of the process fails, cancel
the entire process --->
8 : <!--- Process file upload --->
9 : <CFFILE action="upload"
filefield="form.rfile"
10 : destination="e:\webs\energyguide\resumes\"
11 : nameconflict="makeunique">
---------------
Any other ideas? :-\
-Gel
-----Original Message-----
From: Ben Doom [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 1:05 PM
To: CF-Talk
Subject: RE: CFFILE error:formfield File does not contain a file
Did you remember to set your form to multipart? I always forget that
bit....
--Ben Doom
Programmer & General Lackey
Moonbow Software
: -----Original Message-----
: From: Angel Stewart [mailto:[EMAIL PROTECTED]]
: Sent: Friday, December 13, 2002 11:31 AM
: To: CF-Talk
: Subject: CFFILE error:formfield File does not contain a file
:
:
: Hey all,
:
: Here's my code
:
: <CFTRANSACTION> <!--- If any part of the process fails, cancel
: the entire process --->
: <!--- Process file upload --->
: <CFFILE action="upload"
: filefield="form.fuckingfile"
: destination="e:\webs\theenergyguide\resumes\"
: nameconflict="makeunique">
:
: <CFIF cffile.filewassaved ><!--- if
: cffile.filewassaved is true --->
:
: <!--- Insert data into database
: including the new filename for the word document--->
: And this is the error I get:
: ----------------
:
: The form field "FILE" did not contain a file.
:
:
: The Error Occurred in E:\webs\theenergyguide\postresume.cfm: line 9
:
: 7 : <CFTRANSACTION> <!--- If any part of the process fails, cancel
: the entire process --->
: 8 : <!--- Process file upload --->
: 9 : <CFFILE action="upload"
: filefield="form.fuckingfile"
: 10 : destination="e:\webs\energyguide\resumes\"
: 11 : nameconflict="makeunique">
: ---------------
: I select a valid file in the form. The fieldnames are all correct.
: I click submit...and the CFFILE always fails with that cryptic error
: message.
:
: Anyone seen this before? What am I doing wrong?
:
: -Gel
:
:
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm