Title:
ContinueOnError attribute does not work with CFFILE action=upload or FileUpload()
| View in TrackerStatus/Resolution/Reason: To Fix//BugVerified
Reporter/Name(from Bugbase): N T. / ()
Created: 05/04/2019
Components: File Management, CFFile
Versions: 2016,2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2016,0,10,314028 /
Priority/Frequency: Normal / Most users will encounter
Locale/System: / Windows 7
Vote Count: 0
Problem Description:
The documentation lists "ContinueOnError" as a supported attribute when using action=upload. However, it doesn't work in CF11 or CF2016.
https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-f/cffile-action-upload.html
Steps to Reproduce:
1. Use the form below to upload a file
2. Next, upload the SAME file again
<cfif structKeyExists(FORM, "submit")>
<cffile destination="c:/temp"
action="uploadAll"
nameconflict="ERROR"
continueOnError="true"
errors="myErrors"
filefield="file_path" />
<cfdump var="#cffile#" label="cffile">
<cfdump var="#myErrors#" label="errors">
</cfif>
<form method="POST"
enctype="multipart/form-data">
<input type="file" name="file_path">
<input type="submit" name="test">
</form>
Actual Result:
The second time the file is uploaded, an error is thrown:
"File overwriting is not permitted in this instance of the cffile tag"
Expected Result:
The code should complete successfully and the variable "myErrors" should be populated with the error message.
Any Workarounds:
Use action=uploadAll instead.
Attachments:
Comments: