Skip to content

Commit

Permalink
Add check if files have actually been submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
andjsch committed Jan 18, 2024
1 parent af3c359 commit 4a4b299
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private function validateContentType($request, $form)
{
$type = Str::before($request->headers->get('CONTENT_TYPE'), ';');

if ($type !== 'multipart/form-data' && $form->hasFiles()) {
if ($type !== 'multipart/form-data' && $form->hasFiles() && $request->assets()) {
throw new FileContentTypeRequiredException;
}
}
Expand Down

0 comments on commit 4a4b299

Please sign in to comment.