I want to be able to check that the user did not press the submit button
without first choosing a file.

I've got:

<--- ChooseFile.cfm --->

<form action="index.cfm?go=BatchUpdate" method="post"
enctype="multipart/form-data" name="myForm">

    <tr><td><input type="file" name="UpdateFile" size="36"></td></tr>
    <tr><td><br><input type="submit" value="submit"></td></tr>
</form>

I validate to see if there is an empty field with:

<--- ValidateFile.cfm --->

<cfif FORM.UpdateFile IS " ">
<cflocation url="ChooseFile.cfm?Message=1">
</cfif>

<cfif CGI.CONTENT_LENGTH EQ 0>
<cflocation url="ChooseFile.cfm?Message=1">
</cfif>


But I can't catch the empty field or zero lenght file thereby getting an
error message:

<--- Error Message --->

Error processing CFFILE

No data was received in the uploaded file '\.' Saving empty (zero-length)
files is prohibitted. Please make sure you specified the correct file.


-----------

Sebastian

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to