Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6723937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:37:43+00:00 2026-05-26T09:37:43+00:00

I have a form that I would like to submit to a component for

  • 0

I have a form that I would like to submit to a component for processing (CRUD behaviors), the problem is it seems passing multipart/form-data to a component somehow looses the file location. When it gets to the part of the component that should be uploading the file I get the infamous form field did not contain a file error.

I am not 100% sure why this happening but if I submit the form directly to a .cfm page that performs the cffile action everything works as expected, but if the .cfm page does something like:

<cfobject name="process_form" component="processor" />
<cfset result = process_form.upload( form ) />

and the component “processor” tries to do the upload, I get the form field did not contain a file.

My processor looks like:

    <cfcomponent name="processor">
      <cffunction name="upload" returntype="string">
      <cfargument name="form_data" type="struct" />
      <cffile action="upload" filefield="#arguments.form_data.file_1#" ...>
          [ ... ]
      </cffunction>
    </cfcomponent>

One thing to note, is if I try use the variable arguments.form_data.file_1 without the # signs around it, I get the error:

The form field arguments.form_data.file_1 did not contain a file.

If I put the # signs around the variable I get:

The form field C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\neotmp7350969777287007477.tmp did not contain a file. 

Any idea on how to fix this issue? I would rather have all my processing actions inside a component, but right now I can’t seem to make that work.

Thanks!
Will

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:37:44+00:00Added an answer on May 26, 2026 at 9:37 am

    You shouldn’t need to use the full variable name when using a cffile tag–you just need the form field name, so something like:

    <cffile action="upload" filefield="file_1" ...>
    

    should suffice. The FORM struct field holds the location of the temporary file, but the cffile tag doesn’t need that (I’d image that id directly accesses the FORM struct on the backend based on the fieldname you’ve provided).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have a form that can submit to two different action
I have an ajax form that I would like to submit, and the response
I have a form that has multiple .submit validations. I would like to register
I have a button that I would like to disable when the form submits
I have a form that I would like to style. specifcally I would like
I would like to have an aspx page that contains something like.... <form id=form1
I have an existing form that I would like to add email functionality to.
I have a simple form that I would like to validate on form submission.
I have a form that I use in my CMS that I would like
In a Couchapp, I would like to have a login form that works without

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.