CFFILE action="upload" problem

I have problem of uploading file using cffile.
Here is my code:

<CFIF (isDefined("FORM.filename") AND Len(FORM.filename) GT 0)>
     <CFFILE     DESTINATION="\" action="UPLOAD" filefield="FORM.filename" nameconflict="OVERWRITE">
<form name="form1" method="post" action="uploadtest.cfm">
<input type="file" name="filename">
<input type="submit" name="Submit" value="Submit">

when I tested it, it gave me this following error:

Error in CFFILE tag

The form field specified in the CFFILE tag (FILENAME) 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 (10:2) to (10:92).

what did I do wrong?
Much appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

widya219Author Commented:
I found the solution. I need the 'enctype="multipart/form-data"' in  my form tag.

It should be:
<form name="form1" method="post" action="uploadtest.cfm" 'enctype="multipart/form-data">
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation in the Cleanup topic area:


Please leave any comments here within the next four days.

EE Cleanup Volunteer
PAQed, with points refunded (20)

ee_ai_construct - (re-order part number #xm34)
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.