Skip to content

Commit 4b5d89f

Browse files
committed
1 parent 8a4fc0b commit 4b5d89f

17 files changed

+51
-41
lines changed

demo/src/main/webapp/js/FileAPI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload-all.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.10
6+
* @version 12.2.11
77
*/
88

99
(function () {
@@ -424,7 +424,7 @@ if (!window.FileReader) {
424424
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
425425
* progress, resize, thumbnail, preview, validation and CORS
426426
* @author Danial <[email protected]>
427-
* @version 12.2.10
427+
* @version 12.2.11
428428
*/
429429

430430
if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
@@ -445,7 +445,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
445445

446446
var ngFileUpload = angular.module('ngFileUpload', []);
447447

448-
ngFileUpload.version = '12.2.10';
448+
ngFileUpload.version = '12.2.11';
449449

450450
ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
451451
var upload = this;
@@ -1676,13 +1676,15 @@ ngFileUpload.service('UploadValidate', ['UploadDataUrl', '$q', '$timeout', funct
16761676
if (ngModel) {
16771677
ngModel.$formatters.push(function (files) {
16781678
if (ngModel.$dirty) {
1679+
var filesArray = files;
16791680
if (files && !angular.isArray(files)) {
1680-
files = [files];
1681+
filesArray = [files];
16811682
}
1682-
upload.validate(files, 0, ngModel, attr, scope).then(function () {
1683-
upload.applyModelValidation(ngModel, files);
1683+
upload.validate(filesArray, 0, ngModel, attr, scope).then(function () {
1684+
upload.applyModelValidation(ngModel, filesArray);
16841685
});
16851686
}
1687+
return files;
16861688
});
16871689
}
16881690
};

demo/src/main/webapp/js/ng-file-upload-all.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload-shim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.10
6+
* @version 12.2.11
77
*/
88

99
(function () {

demo/src/main/webapp/js/ng-file-upload-shim.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
33
* progress, resize, thumbnail, preview, validation and CORS
44
* @author Danial <[email protected]>
5-
* @version 12.2.10
5+
* @version 12.2.11
66
*/
77

88
if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
@@ -23,7 +23,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
2323

2424
var ngFileUpload = angular.module('ngFileUpload', []);
2525

26-
ngFileUpload.version = '12.2.10';
26+
ngFileUpload.version = '12.2.11';
2727

2828
ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
2929
var upload = this;
@@ -1254,13 +1254,15 @@ ngFileUpload.service('UploadValidate', ['UploadDataUrl', '$q', '$timeout', funct
12541254
if (ngModel) {
12551255
ngModel.$formatters.push(function (files) {
12561256
if (ngModel.$dirty) {
1257+
var filesArray = files;
12571258
if (files && !angular.isArray(files)) {
1258-
files = [files];
1259+
filesArray = [files];
12591260
}
1260-
upload.validate(files, 0, ngModel, attr, scope).then(function () {
1261-
upload.applyModelValidation(ngModel, files);
1261+
upload.validate(filesArray, 0, ngModel, attr, scope).then(function () {
1262+
upload.applyModelValidation(ngModel, filesArray);
12621263
});
12631264
}
1265+
return files;
12641266
});
12651267
}
12661268
};

demo/src/main/webapp/js/ng-file-upload.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/FileAPI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-file-upload-all.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.10
6+
* @version 12.2.11
77
*/
88

99
(function () {
@@ -424,7 +424,7 @@ if (!window.FileReader) {
424424
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
425425
* progress, resize, thumbnail, preview, validation and CORS
426426
* @author Danial <[email protected]>
427-
* @version 12.2.10
427+
* @version 12.2.11
428428
*/
429429

430430
if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
@@ -445,7 +445,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
445445

446446
var ngFileUpload = angular.module('ngFileUpload', []);
447447

448-
ngFileUpload.version = '12.2.10';
448+
ngFileUpload.version = '12.2.11';
449449

450450
ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
451451
var upload = this;
@@ -1676,13 +1676,15 @@ ngFileUpload.service('UploadValidate', ['UploadDataUrl', '$q', '$timeout', funct
16761676
if (ngModel) {
16771677
ngModel.$formatters.push(function (files) {
16781678
if (ngModel.$dirty) {
1679+
var filesArray = files;
16791680
if (files && !angular.isArray(files)) {
1680-
files = [files];
1681+
filesArray = [files];
16811682
}
1682-
upload.validate(files, 0, ngModel, attr, scope).then(function () {
1683-
upload.applyModelValidation(ngModel, files);
1683+
upload.validate(filesArray, 0, ngModel, attr, scope).then(function () {
1684+
upload.applyModelValidation(ngModel, filesArray);
16841685
});
16851686
}
1687+
return files;
16861688
});
16871689
}
16881690
};

dist/ng-file-upload-all.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-file-upload-shim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.10
6+
* @version 12.2.11
77
*/
88

99
(function () {

0 commit comments

Comments
 (0)