From: Alexander Ebert Date: Sun, 11 Jan 2015 21:30:52 +0000 (+0100) Subject: Allow upload of arbitrary files unknown to the browser X-Git-Tag: 2.1.0_Beta_4~105 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7aa9e5deb75dc86a59b670b675819e85bb5bd8e4;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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] }); } } },