From 46fea69de7a2a5b91b60a6e7259a5c69f3eb0536 Mon Sep 17 00:00:00 2001 From: Sebastian Tschan Date: Thu, 28 Nov 2013 17:55:09 +0100 Subject: [PATCH] Only submit files without errors. Closes #2770 --- js/jquery.fileupload-angular.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/jquery.fileupload-angular.js b/js/jquery.fileupload-angular.js index 644de8a1f..b0185b424 100644 --- a/js/jquery.fileupload-angular.js +++ b/js/jquery.fileupload-angular.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload AngularJS Plugin 2.1.1 + * jQuery File Upload AngularJS Plugin 2.1.2 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2013, Sebastian Tschan @@ -62,7 +62,9 @@ }; }); file.$submit = function () { - return data.submit(); + if (!file.error) { + return data.submit(); + } }; file.$cancel = function () { return data.abort();