onWhenAddingFileFailed never fires #1221
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are 2 issues with
_failFilterIndexthat causeonWhenAddingFileFailednever to fire._failFilterIndexwill never change to a value greater than0due to the Incorrectif (this._failFilterIndex) {condition:_isValidFilereturnsfalse(if any filter fails),this._failFilterIndexis always0(as we saw in the previous_isValidFileissue - see above). Сonsidering the previous statement, the invalid conditionif(this._failFilterIndex)with a value of0will not fire _onWhenAddingFileFailed:As the result, the FileUploader's
onWhenAddingFileFailedis not called.Was broken during the upgrade to angular 11:
Related MR
Related commit with file-uploader.class.ts changes
Pull request with the fix.