fix: raise file upload limit from 4 MB to 8 MB
PHP constant and all JS client-side guards updated. Server PHP ini is 64M. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -488,7 +488,7 @@ function dbnToolsExcerpt(string $text, int $limit = 520): string
|
||||
return rtrim(mb_substr($text, 0, $limit - 1, 'UTF-8')) . '…';
|
||||
}
|
||||
|
||||
const DBN_TOOLS_EXTRACT_MAX_BYTES = 4 * 1024 * 1024;
|
||||
const DBN_TOOLS_EXTRACT_MAX_BYTES = 8 * 1024 * 1024;
|
||||
const DBN_TOOLS_EXTRACT_TEXT_LIMIT = 128000;
|
||||
const DBN_TOOLS_EXTRACT_ALLOWED_EXTS = ['txt', 'pdf', 'docx'];
|
||||
|
||||
@@ -516,7 +516,7 @@ function dbnToolsExtractUploadedFile(array $file): array
|
||||
dbnToolsAbort('The uploaded file is empty.', 422, 'file_empty');
|
||||
}
|
||||
if ($size > DBN_TOOLS_EXTRACT_MAX_BYTES) {
|
||||
dbnToolsAbort('File exceeds the 4 MB limit.', 413, 'file_too_large');
|
||||
dbnToolsAbort('File exceeds the 8 MB limit.', 413, 'file_too_large');
|
||||
}
|
||||
|
||||
$ext = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
||||
|
||||
Reference in New Issue
Block a user