diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js index e926ca23d767..8e2af4488341 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js @@ -65,7 +65,6 @@ angular.module("umbraco.directives") function _filesQueued(files, event) { //Push into the queue Utilities.forEach(files, file => { - if (_filterFile(file) === true) { if (file.$error) { @@ -173,6 +172,8 @@ angular.module("umbraco.directives") } } else if (evt.Message) { file.serverErrorMessage = evt.Message; + } else if (evt && typeof evt === 'string') { + file.serverErrorMessage = evt; } // If file not found, server will return a 404 and display this message if (status === 404) { @@ -247,11 +248,18 @@ angular.module("umbraco.directives") return true;// yes, we did open the choose-media dialog, therefor we return true. } - scope.handleFiles = function(files, event) { + scope.handleFiles = function(files, event, invalidFiles) { + const allFiles = [...files, ...invalidFiles]; + + // add unique key for each files to use in ng-repeats + allFiles.forEach(file => { + file.key = String.CreateGuid(); + }); + if (scope.filesQueued) { - scope.filesQueued(files, event); + scope.filesQueued(allFiles, event); } - _filesQueued(files, event); + _filesQueued(allFiles, event); }; } }; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html b/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html index e5466d1da03f..ff0e8970a464 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html @@ -6,7 +6,7 @@
@@ -43,7 +43,7 @@