Level 14
Are you receiving the file? can you confirm that you added the enctype to the form
<form action="/action" method="post" enctype="multipart/form-data">
1 like
Hello,
When I upload a file with vue and try to check it with the Laravel validator using:
$validator = Validator::make($request->all(), [
'file1' => 'nullable|mimes:jpeg,png,jpg|max:500|dimensions:max_width=400,max_height=400',
]);
if ($validator->fails()) {
return response()->json(['errors' => $validator->errors()], 422);
}
I tried to upload a file as big as 2.5 meg and also with dimensions of 600 x 400 px, they all pass through.
Any idea why please?
Thanks
Are you receiving the file? can you confirm that you added the enctype to the form
<form action="/action" method="post" enctype="multipart/form-data">
Please or to participate in this conversation.