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="form1" method="post" action="admin_u_editor.cfm">
<input name="file1" type="file" id="file1" size="32" class="text">
<INPUT NAME="file2" TYPE="file" id="file2" SIZE="32" class="text">
<input type="submit" value="Abschicken" class="text">
</form>
...and this is the editing page.
<cfif #form.which# EQ "galleryadd">
<cffile action="UPLOAD"
filefield="file1"
destination="d:\ nameconflict="MAKEUNIQUE">
<cfset file1=cffile.serverFile>
<cffile action="UPLOAD"
filefield="file2"
destination="d:\ nameconflict="MAKEUNIQUE">
<cfquery datasource = "#ODBC_Datasource#">
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="admin_u_gallery.cfm">
</cfif>
Why is it not recognizing the files? Any idea?
Tnx in advance.
Adrian
Tnx in advance.
Adrian
(Travel website)
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="form1" method="post" action="admin_u_editor.cfm">
<input name="file1" type="file" id="file1" size="32" class="text">
<INPUT NAME="file2" TYPE="file" id="file2" SIZE="32" class="text">
<input type="submit" value="Abschicken" class="text">
</form>
...and this is the editing page.
<cfif #form.which# EQ "galleryadd">
<cffile action="UPLOAD"
filefield="file1"
destination="d:\ nameconflict="MAKEUNIQUE">
<cfset file1=cffile.serverFile>
<cffile action="UPLOAD"
filefield="file2"
destination="d:\ nameconflict="MAKEUNIQUE">
<cfquery datasource = "#ODBC_Datasource#">
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="admin_u_gallery.cfm">
</cfif>
Why is it not recognizing the files? Any idea?
Tnx in advance.
Adrian
Tnx in advance.
Adrian
(Travel website)