Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

CFFILE action="upload" problem

Hi,
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">
</cfif>
<form name="form1" method="post" action="uploadtest.cfm">
<input type="file" name="filename">
<input type="submit" name="Submit" value="Submit">
</form>

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.
0
widya219
Asked:
widya219
1 Solution
 
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">
0
 
mrichmonCommented:
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:

PAQ/Refund

Please leave any comments here within the next four days.

mrichmon
EE Cleanup Volunteer
0
 
ee_ai_constructCommented:
PAQed, with points refunded (20)

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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now