• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFFILE Errors

Guest
May 15, 2006 May 15, 2006

Copy link to clipboard

Copied

For some reason, cffile will not work for me. I have the following form to submit a file:

<form name="form" method="post" action="uploadFormBk.cfm" encytype="multipart/form-data">
Location: <input type="file" name="resourceURL"> <input type="submit" name="Submit" value="Submit">
</form>

And the action page:

<cfif IsDefined("Form.resourceURL") AND Form.resourceURL NEQ "">
<cfset uploadPath = GetDirectoryFromPath(GetTemplatePath())>
<cffile action="upload" fileField="#Form.resourceURL#" destination="#uploadPath#" nameConflict="overwrite" accept="application/pdf">
</cfif>

The error I get is: CFFILE action="upload" requires forms to use enctype="multipart/form-data".

That's what I set the form to!
TOPICS
Advanced techniques

Views

296

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 15, 2006 May 15, 2006

Copy link to clipboard

Copied

LATEST
can you try for a test:

changing the form name to something else
remove 'enctype' attribute in form tag
remove 'accept' attribute in cffile tag

jam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation