From e807ee7d643c8ce73158144244feb81f57c2a4df Mon Sep 17 00:00:00 2001 From: rodyvansambeek Date: Wed, 17 Feb 2016 10:30:57 +0100 Subject: [PATCH] Changed allow upload whitelist to disallow extensions It is not possible to upload files in 7.4.0 with an extension different then the imageTypes in the Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes, in the single upload this was changed after beta 7.4.0-beta1 to Umbraco.Sys.ServerVariables.umbracoSettings.disallowedUploadFiles. However the change was not added to the drag-drop-uploader. This fixes that. --- .../listview/layouts/list/list.listviewlayout.controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js index 6f1af4f80d..1d2d361f28 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js @@ -6,7 +6,9 @@ var vm = this; vm.nodeId = $scope.contentId; - vm.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes); + //vm.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes); + //instead of passing in a whitelist, we pass in a blacklist by adding ! to the ext + vm.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.disallowedUploadFiles).replace(/./g, "!."); vm.maxFileSize = Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB"; vm.activeDrag = false; vm.isRecycleBin = $scope.contentId === '-21' || $scope.contentId === '-20';