Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Fix validating image/jpeg images after Symfony/Mime update #35419

Merged
merged 2 commits into from
Nov 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[6.x] Fix validating image/jpeg images after Symfony/Mime update
Symfony/Mime v5.20 changed the returned extension for an image with image/jpeg mime type: symfony/mime@aa1d922. This commit adds `.jpg`, which fixes the validation.
  • Loading branch information
Grldk authored Nov 30, 2020
commit a885a0da06ea3019f49cec39b5feae675f06531c
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ public function validateLte($attribute, $value, $parameters)
*/
public function validateImage($attribute, $value)
{
return $this->validateMimes($attribute, $value, ['jpeg', 'png', 'gif', 'bmp', 'svg', 'webp']);
return $this->validateMimes($attribute, $value, ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp']);
}

/**
Expand Down