2 Replies Latest reply on Jun 27, 2007 12:12 PM by goblues68

    CFFILE error handling

      How does a person catch a cffile upload error and return to the form if the requested file is not found?
        • 1. CFFILE error handling
          jdeline Level 1
          Your CFFILE upload must be given a variable such as FORM.myFile that is provided from the previous page. This is provided as <INPUT TYPE="file" NAME="myFile" ... >. This, in turn, let's the user browse to the file and select it for upload. So under normal circumstances, the file that is passed th CFFILE exists.

          If the user browses to a file and selects it, then deletes the file using Windows Explorer and then clicks "Submit", CFFILE will throw an error, which can be caught using CFTRY/CFCATCH.
          • 2. Re: CFFILE error handling
            goblues68 Level 1
            Thanks! I got it working...