I开发者_C百科n coldfusion how do you check if they choose a file to upload to the server? Isdefined won't tell if they specified a file or not.
<form enctype="multipart/form-data" method="post">
<input name="file" type="file">
<input type="submit">
</form>
<cfif structKeyExists(FORM, "file") AND len(FORM.file)>
You have chosen a file to upload to the server.
<cfelse>
You have NOT chosen a file to upload to the server.
</cfif>
精彩评论