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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFFILE upload problem

Status
Not open for further replies.

ram123

Programmer
Mar 6, 2001
59
US
I am trying to upload a file. But i am getting an error, it is not detecting the input file field parameter.
Any Help?


Here is my code.

first page

<form name=&quot;frmupload&quot; action=&quot;upload.cfm&quot; mehod=&quot;post&quot;>
<input type=&quot;File&quot; name=&quot;testfile&quot; value=&quot;browse&quot;>
<input type=&quot;Submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;>
</form>

and in the upload.cfm

<cffile action=&quot;UPLOAD&quot;
destination=&quot;d:\webshare\test\ramesht\test\test.exe&quot;
nameconflict=&quot;MAKEUNIQUE&quot;
filefield=&quot;testfile&quot;>


I am getting this error:

Error in CFFILE tag
The form field specified in the CFFILE tag (TESTFILE) 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 (14:1) to (17:28).
 
Hey Ram,

When doing a file upload, you have to specify the encoding. I think this will fix it for you.

<form
name=&quot;frmupload&quot;
action=&quot;upload.cfm&quot;
method=&quot;post&quot;
enctype=&quot;multipart/form-data&quot;
>

Also, in your CFFile tag, the destination attribute should contain just the directory path and not the full path to the file. I think you will need to change that attribute to this:

destination=&quot;d:\webshare\test\ramesht\test\&quot;

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top