diff --git a/resources/views/admin/orders/create.php b/resources/views/admin/orders/create.php index e4159e8..baf5c04 100644 --- a/resources/views/admin/orders/create.php +++ b/resources/views/admin/orders/create.php @@ -4,6 +4,28 @@ $errorMsg = $_SESSION['flash_error'] ?? ''; if ($hasError) { unset($_SESSION['flash_error']); // Prevent toast from showing } + +function getBytesFromIni($val) { + if (empty($val)) return 0; + $val = trim($val); + $last = strtolower($val[strlen($val)-1]); + $val = (int)$val; + switch($last) { + case 'g': $val *= 1024; + case 'm': $val *= 1024; + case 'k': $val *= 1024; + } + return $val; +} + +$maxUploadSizeBytes = getBytesFromIni(ini_get('upload_max_filesize')); +$maxPostSizeBytes = getBytesFromIni(ini_get('post_max_size')); + +// Fallbacks caso não consiga ler corretamente +if ($maxUploadSizeBytes <= 0) $maxUploadSizeBytes = 20 * 1024 * 1024; +if ($maxPostSizeBytes <= 0) $maxPostSizeBytes = 20 * 1024 * 1024; + +$maxUploadSizeMB = floor($maxUploadSizeBytes / (1024 * 1024)); ?>
, )'> @@ -115,7 +137,7 @@ if ($hasError) { -

Arquivos da ordem judicial (decisão, ofícios, etc.). Tipos aceitos: PDF, PNG, JPG, GIF, DOC, DOCX, XLS, XLSX, TXT — máx. 20 MB por arquivo.

+

Arquivos da ordem judicial (decisão, ofícios, etc.). Tipos aceitos: PDF, PNG, JPG, GIF, DOC, DOCX, XLS, XLSX, TXT — máx. MB por arquivo.