I have a form which people fill out to reply to a job offer. On the form they have the option of uploading a resume file. The action form uploads the file to a directory on the server and then sends the file in an email to the employer. It works great except when the applicant does not include a resume file.
Here is a snippet of code at the top of my action page.
This code checks to see if the resume file (form.cvfile) exists. If it does it uploads it to the server and makes the name unique. If the file was not submitted on the form it ignores it and goes on to the rest of the page's coding.
Here is the error message I get when the form submission does not include a file...
Any ideas???
Here is a snippet of code at the top of my action page.
Code:
<CFIF IsDefined("form.cvfile")>
<CFFILE ACTION="Upload"
FILEFIELD="form.cvfile"
DESTINATION="D:\steel-link\cvfiles\"
accept = "text/plain, application/msword, application/pdf"
NAMECONFLICT="MakeUnique">
<CFELSE></cfif>
This code checks to see if the resume file (form.cvfile) exists. If it does it uploads it to the server and makes the name unique. If the file was not submitted on the form it ignores it and goes on to the rest of the page's coding.
Here is the error message I get when the form submission does not include a file...
Code:
Error Occurred While Processing Request
The form field "form.cvfile" did not contain a file.
The error occurred in D:\steel-link.com\2002\careers\Apply_Action.cfm: line 6
4 : DESTINATION="D:\steel-link\cvfiles\"
5 : accept = "text/plain, application/msword, application/pdf"
6 : NAMECONFLICT="MakeUnique">
7 : <CFELSE></cfif>
8 :
Any ideas???