X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/blobdiff_plain/97971a35ce678939f577c4fc44c054ef98c72f0b..f93cfddfd0fe0f6e78a8a27e05889d35db8a0dd4:/lib/functions.js.php diff --git a/lib/functions.js.php b/lib/functions.js.php index 29d50c1..cafecaf 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -430,9 +430,9 @@ function classic_upload (file, time, password, one_time) req.upload.addEventListener ("progress", upload_progress, false); req.addEventListener ("error", XHRErrorHandler, false); req.addEventListener ("abort", XHRErrorHandler, false); - req.onreadystatechange = function () + req.onload = function () { - if (req.readyState == 4 && req.status == 200) + if (req.status === 200) { var res = req.responseText; @@ -479,6 +479,13 @@ function classic_upload (file, time, password, one_time) function check_html5_file_api () { + + // Enforce classic upload is enabled through config! + return false; + return window.File && window.FileReader && window.FileList && window.Blob; }