Increase file upload validation limits

- EntregaController: max:2048 -> max:20480 (2MB -> 20MB)
- UpdateUserProfileInformation: max:1024 -> max:5120 (1MB -> 5MB)

The server-level limits (nginx client_max_body_size and php.ini) were
already raised in the previous commit; these Laravel validation rules
were the remaining bottleneck blocking uploads over 2MB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-09 08:01:13 -06:00
parent ff5b6f5eec
commit 56f4e3b226
2 changed files with 2 additions and 2 deletions
@@ -22,7 +22,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
'apellidoPaterno' => ['nullable', 'string', 'max:255'], 'apellidoPaterno' => ['nullable', 'string', 'max:255'],
'apellidoMaterno' => ['nullable', 'string', 'max:255'], 'apellidoMaterno' => ['nullable', 'string', 'max:255'],
'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)], 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'], 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:5120'],
])->validateWithBag('updateProfileInformation'); ])->validateWithBag('updateProfileInformation');
if (isset($input['photo'])) { if (isset($input['photo'])) {
+1 -1
View File
@@ -71,7 +71,7 @@ class EntregaController extends Controller
public function store(Request $request, Tarea $tarea) public function store(Request $request, Tarea $tarea)
{ {
$request->validate([ $request->validate([
'archivo' => 'nullable|file|max:2048', 'archivo' => 'nullable|file|max:20480',
'texto' => 'nullable|string|max:5000', 'texto' => 'nullable|string|max:5000',
]); ]);