This commit is contained in:
Shish 2024-01-01 00:53:46 +00:00 committed by Shish
parent 3462a81c28
commit e3fb67661e
3 changed files with 5 additions and 4 deletions

View file

@ -21,7 +21,8 @@
"postCreateCommand": "./.docker/entrypoint.sh unitd --no-daemon --control unix:/var/run/control.unit.sock",
"containerEnv": {
"UID": "2000",
"GID": "2000"
"GID": "2000",
"UPLOAD_MAX_FILESIZE": "50M",
},
"customizations": {
"vscode": {

View file

@ -15,7 +15,7 @@ function updateTracker() {
if (input.files.length) {
if(cancelbtn) cancelbtn.style.visibility = 'visible';
for (var i = 0; i < input.files.length; i++) {
size += input.files[i].size;
size += input.files[i].size + 1024; // extra buffer for metadata
if (window.shm_max_size > 0 && input.files[i].size > window.shm_max_size) {
toobig = true;
}

View file

@ -42,7 +42,7 @@ class UploadTheme extends Themelet
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
$max_size = $config->get_int(UploadConfig::SIZE);
$max_kb = to_shorthand_int($max_size);
$max_total_size = parse_shorthand_int(ini_get('post_max_size')) - 102400; //leave room for http request data
$max_total_size = parse_shorthand_int(ini_get('post_max_size'));
$max_total_kb = to_shorthand_int($max_total_size);
$upload_list = $this->build_upload_list();