Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cffile not recognizing formfiel

Status
Not open for further replies.

eladi

Programmer
Sep 4, 2001
80
AU
Hi,

I work with the cffile on a different website already. On a new project, I have to have to upload two files. While processing, I get the following error:

Error in CFFILE tag
The form field specified in the CFFILE tag (FILE1) does not contain an uploaded file. Please be sure that you have specified the correct form field name.

This is the code I generated:

Form to select files

<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;admin_u_editor.cfm&quot;>
<input name=&quot;file1&quot; type=&quot;file&quot; id=&quot;file1&quot; size=&quot;32&quot; class=&quot;text&quot;>
<INPUT NAME=&quot;file2&quot; TYPE=&quot;file&quot; id=&quot;file2&quot; SIZE=&quot;32&quot; class=&quot;text&quot;>
<input type=&quot;submit&quot; value=&quot;Abschicken&quot; class=&quot;text&quot;>
</form>

...and this is the editing page.

<cfif #form.which# EQ &quot;galleryadd&quot;>
<cffile action=&quot;UPLOAD&quot;
filefield=&quot;file1&quot;
destination=&quot;d:\ nameconflict=&quot;MAKEUNIQUE&quot;>

<cfset file1=cffile.serverFile>

<cffile action=&quot;UPLOAD&quot;
filefield=&quot;file2&quot;
destination=&quot;d:\ nameconflict=&quot;MAKEUNIQUE&quot;>


<cfquery datasource = &quot;#ODBC_Datasource#&quot;>
INSERT INTO usergallery(userid, picSmall, picLarge, continent, country, descriptionshort, descriptionlong)
VALUES('#SESSION.s_loggedUser#', '#file1#', '#CFFile.ServerFile#', '#form.continent#', '#form.country#', '#form.descriptionshort#', '#form.descriptionlong#')
</cfquery>
<cflocation url=&quot;admin_u_gallery.cfm&quot;>
</cfif>

Why is it not recognizing the files? Any idea?
Tnx in advance.
Adrian

Tnx in advance.
Adrian
(Travel website)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top