I have created a form that users will be able to upload a file if needed.
My problem is when the input field for the file is left blank on the form
and then I do the submit I am getting the following error:

"Error Occurred While Processing Request,
Error Diagnostic Information
Error processing CFFILE
No data was received in the uploaded file '\' Saving empty (zero-length)
files is prohibited. Please make sure you specified the correct file."

When the user uses the form they will not always want to upload a file, how
can I correct this problem and not have it always require a file in the
field.  Please help I have included a snippet of the form for the input and
also a snippet from the action form.

On the Input Form:
        <TR bgcolor="#8081A0">
        <TD colspan="4">
        Upload Document:
          <input type="file" name="docloc" size="30" required="no"
value="#Attributes.DocLoc#">
        </TD>

On the Action page:
        <cfif len(Attributes.DocLoc)>
        <cffile action="UPLOAD" filefield="DocLoc"
destination="\\Cctest\Documents\" nameconflict="ERROR" accept="html">
        </cfif>

Thank You
Corey


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to