I'm probably just having a serious case of brain breeze, but here it is. This is my form page to upload two files(among other information):
And here is my action page:
And this is the error I get. I checked my form fields, and EXEFILE does exist and contains data.
Error in CFFILE tag
The form field specified in the CFFILE tag (EXEFILE) does not contain an uploaded file. Please be sure that you have specified the correct form field name.
The error occurred while processing an element with a general identifier of (CFFILE), occupying document position (16:1) to (19:29) in the template file C:\Inetpub\
I copied the logic from another form that works fine. What am I doing wrong, here? Thanks for your help!
Calista :-X
Jedi Knight,
Champion of the Force
Code:
<CFOUTPUT>
<FORM ACTION="AddNewToolAction.cfm" METHOD="post">
<B>Enter Tool Name</B><BR>
<INPUT TYPE="text" NAME="ToolName" SIZE="75" MAXLENGTH="254"><BR><BR>
<B>Enter Description of Tool</B><BR>
<INPUT TYPE="text" NAME="ToolDescription" SIZE="75" MAXLENGTH="254"><BR><BR>
<B>Select executable file:</B><BR>
<INPUT TYPE="File" NAME="ExeFile" SIZE="63" MAXLENGTH="254"><BR><BR>
<B>Select document file:</B><BR>
<INPUT TYPE="File" NAME="DocFile" SIZE="63" MAXLENGTH="254"><BR><BR>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit">
<INPUT TYPE="reset" NAME="Reset" VALUE="Clear Form"><BR><BR>
</FORM>
</CFOUTPUT>
Code:
<!--- Define variables --->
<CFSET MyDirectory = "C:\Inetpub\[URL unfurl="true"]wwwroot\CFDOCS\NewIntranet\Documents">[/URL]
<CFSET ToolName = "#Form.ToolName#">
<CFSET ToolDescription = "#Form.ToolDescription#">
<!--- First, upload the executable file. --->
<CFFILE ACTION="UPLOAD"
FILEFIELD="ExeFile"
DESTINATION="#MyDirectory#"
NAMECONFLICT="Error">
<CFSET ToolLocation = "#File.ServerDirectory#\#File.ServerFile#">
<!--- Then upload documentation --->
<CFFILE ACTION="UPLOAD"
FILEFIELD="DocFile"
DESTINATION="#MyDirectory#"
NAMECONFLICT="Error">
<CFSET ToolDocLocation = "#File.ServerDirectory#\#File.ServerFile#">
<!--- Insert data --->
<CFQUERY NAME="InsertData"
DATASOURCE="#Application.Datasource#"
DBTYPE="ODBC">
INSERT INTO ToolTable
(ToolID,ToolName,ToolDescription,ToolLocation,ToolDocLocation)
VALUES
('#CreateUUID()#','#ToolName#','#ToolDescription#','#ToolLocation#','#ToolDocLocation#')
</CFQUERY>
Error in CFFILE tag
The form field specified in the CFFILE tag (EXEFILE) does not contain an uploaded file. Please be sure that you have specified the correct form field name.
The error occurred while processing an element with a general identifier of (CFFILE), occupying document position (16:1) to (19:29) in the template file C:\Inetpub\
I copied the logic from another form that works fine. What am I doing wrong, here? Thanks for your help!
Calista :-X
Jedi Knight,
Champion of the Force