From 7aa9e5deb75dc86a59b670b675819e85bb5bd8e4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 11 Jan 2015 22:30:52 +0100 Subject: [PATCH] Allow upload of arbitrary files unknown to the browser Some files are not properly recognized by the browser, in my tests at least ".eot" resulted in an empty Blob.type in Chrome. Since this can happen with other types and browsers, we'll ignore this now. --- .../install/files/js/3rdParty/redactor/plugins/wupload.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js index 16a2a4402a..2913c6d32c 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wupload.js @@ -185,10 +185,7 @@ RedactorPlugins.wupload = function() { this.wupload._revertDropArea(undefined, $containerID); for (var $i = 0; $i < event.dataTransfer.files.length; $i++) { - var $file = event.dataTransfer.files[$i]; - if ($file.type) { - WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'upload_' + $containerID, { file: $file }); - } + WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'upload_' + $containerID, { file: event.dataTransfer.files[$i] }); } } }, -- 2.20.1