]> git.p6c8.net - jirafeau.git/commitdiff
Config option to enforce "classic download" without HTML5 File Api bug_classic_download
authorPatrick Canterino <patrick@patrick-canterino.de>
Fri, 25 Oct 2024 18:33:41 +0000 (20:33 +0200)
committerPatrick Canterino <patrick@patrick-canterino.de>
Fri, 25 Oct 2024 18:33:41 +0000 (20:33 +0200)
lib/config.original.php
lib/functions.js.php

index 8aec8572dc52948ec3e89bc57a61e84e506d1fd0..3af9fc63571539de52767cfe4809b15963e340d6 100644 (file)
@@ -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).
index b8888a69f90114cba914523fc738301e46e93fd7..c2413a8ecfc8757757c0536857eda3cfd46a9886 100644 (file)
@@ -468,7 +468,17 @@ function classic_upload (file, time, password, one_time)
 
 function check_html5_file_api ()
 {
+<?php
+    if ($cfg['debug_enforce_classic_upload']) {
+?>
+    return false;
+<?php
+    } else {
+?>
     return window.File && window.FileReader && window.FileList && window.Blob;
+<?php
+    }
+?>
 }
 
 var async_global_transfered = 0;

patrick-canterino.de