From: Patrick Canterino Date: Fri, 29 May 2026 14:57:14 +0000 (+0200) Subject: Added config option to enforce legacy synchronous file upload X-Git-Tag: 4.7.2~9^2~4 X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/commitdiff_plain/d9c69f9b8fa039888cd23e53c040df0e8ca8e56c?ds=sidebyside Added config option to enforce legacy synchronous file upload This is useful for debugging, we use it for issue #48 --- diff --git a/lib/config.original.php b/lib/config.original.php index 6b7c342..e77684b 100644 --- a/lib/config.original.php +++ b/lib/config.original.php @@ -235,6 +235,10 @@ $cfg['installation_done'] = false; */ $cfg['debug'] = false; +/* Enable this debug flag to enforce the legacy (synchronous) file upload mechanism. + */ +$cfg['debug_enforce_legacy_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 29d50c1..4e95747 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -479,6 +479,13 @@ function classic_upload (file, time, password, one_time) function check_html5_file_api () { + + // Enforce legacy upload is enabled through config! + return false; + return window.File && window.FileReader && window.FileList && window.Blob; }