Skip to main content
Inspiring
May 2, 2008
Question

Conditional cffile problems

  • May 2, 2008
  • 1 reply
  • 245 views
On my page I have a form with a file upload and a text area. The user copies a portion of a word document into the text area then can choose to upload the file. That part works just fine.

The trouble comes when a document is NOT chosen to be uploaded. What syntax, comment, condition do I need to use in order to stop getting the error "The form field document_name did not contain a file" Since CF is looking for an actual file and not just a string of text how can I avoid this?

I've tried to condition it out of my function and SQL statements with IsDefined and LEN("form.document_name") GT 0 but neither seems to work.

Thank you for any help you can provide.
    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    May 3, 2008
    I attach an example.