Fix crash loading large files

Attempts to load large files are neutered with a warning message

Is 100MB the right limit?
This commit is contained in:
Jeremy Ruston 2025-03-21 14:48:01 +00:00
parent 0b3efc2771
commit 55dbce10f4
2 changed files with 14 additions and 2 deletions

View file

@ -19,6 +19,10 @@ var _bootprefix = (function($tw) {
$tw = $tw || Object.create(null);
$tw.boot = $tw.boot || Object.create(null);
// Config
$tw.config = $tw.config || Object.create(null);
$tw.config.maxEditFileSize = 100 * 1024 * 1024; // 100MB
// Detect platforms
if(!("browser" in $tw)) {
$tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null;