From e98ed4a532ae131ed9f8638ed96b844aba3cab9a Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Fri, 25 Oct 2024 20:33:41 +0200 Subject: [PATCH] Config option to enforce "classic download" without HTML5 File Api --- lib/config.original.php | 5 +++++ lib/functions.js.php | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/config.original.php b/lib/config.original.php index 8aec857..3af9fc6 100644 --- a/lib/config.original.php +++ b/lib/config.original.php @@ -228,6 +228,11 @@ $cfg['installation_done'] = false; */ $cfg['debug'] = false; +/* Enable this flag to enforce the classic upload without the HTML5 File API + * Only set to "true", if you know what you're doing! + */ +$cfg['debug_enforce_classic_upload'] = false; + /** Set Jirafeau's maximal upload chunk * When Jirafeau upload a large file, Jirafeau sends several data chunks to fit server's capabilities. * Jirafeau tries to upload each data chunk with the maximal size allowed by PHP (post_max_size and upload_max_filesize). diff --git a/lib/functions.js.php b/lib/functions.js.php index b8888a6..c2413a8 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -468,7 +468,17 @@ function classic_upload (file, time, password, one_time) function check_html5_file_api () { + + return false; + return window.File && window.FileReader && window.FileList && window.Blob; + } var async_global_transfered = 0; -- 2.34.1