various fixups, allow FTP max size config

This commit is contained in:
zefie
2026-05-04 08:38:22 -04:00
parent cf9cc22a1c
commit 00e385cdbe
5 changed files with 18 additions and 25 deletions

View File

@@ -70,7 +70,7 @@ class WTVFTP {
stream.on('data', (chunk) => {
chunks.push(chunk);
totalsize += chunk.length;
if (totalsize > 1024 * 1024 * 4) {
if (totalsize > 1024 * 1024 * this.minisrv_config.services[this.service_name].max_response_size) {
this.sendToClient(socket, { 'Status': '413 The item chosen contains too much information to be used.', 'Content-Type': 'text/plain' }, 'Item too large');
ftpClient.end();
return;