ng-file-upload
ng-file-upload copied to clipboard
How To clear rejectedFiles on new file upload
Hi all I am currently showing a list of errors on screen and then hiding after a few seconds.I have ngf-model-invalid="errorFiles and I set $scope.errorFiles = []; when finished displaying the errors.However when I upload a new set of files and the validation for one or more fails the new errors PLUS the old errors are being shown even after I had cleared down $scope.errorFiles the values seem to persist.Anyway I can clear down the model used in ngf-model-invalid="errorFiles".
$scope.$watch('errorFiles', function (errorFiles) {
$scope.showAlert = true;
$scope.alerts = errorFiles;
$scope.alert.type = "alert alert-danger text-center";
$timeout(function () {
$scope.showAlert = false;
$scope.errorFiles = [];
}, 4000);
});
- 1 on this error, I'm not being able to trigger a new validation check after I clear the invalidFiles model, so the files can't be uploaded because the form is still invalid.
Confirm that the bug still exits :cry: