From: Patrick Canterino Date: Fri, 25 Oct 2024 18:33:41 +0000 (+0200) Subject: Config option to enforce "classic download" without HTML5 File Api X-Git-Url: https://git.p6c8.net/jirafeau.git/commitdiff_plain/e98ed4a532ae131ed9f8638ed96b844aba3cab9a?ds=sidebyside Config option to enforce "classic download" without HTML5 File Api --- 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;