ng-file-upload icon indicating copy to clipboard operation
ng-file-upload copied to clipboard

How To clear rejectedFiles on new file upload

Open ethanmac opened this issue 6 years ago • 2 comments

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);
});

ethanmac avatar Apr 27 '18 16:04 ethanmac

  • 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.

axul avatar Aug 24 '18 08:08 axul

Confirm that the bug still exits :cry:

leikoilja avatar May 20 '20 07:05 leikoilja