• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFFILE error handling

New Here ,
Jun 25, 2007 Jun 25, 2007

Copy link to clipboard

Copied

How does a person catch a cffile upload error and return to the form if the requested file is not found?
TOPICS
Advanced techniques

Views

348

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 25, 2007 Jun 25, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 27, 2007 Jun 27, 2007

Copy link to clipboard

Copied

LATEST
Thanks! I got it working...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation