more detailed error

This commit is contained in:
Ruben 2016-09-12 17:53:02 +01:00
parent 763fe73eb7
commit 0afa1297e9

View file

@ -165,7 +165,7 @@ class ScoreControllerProvider implements ControllerProviderInterface
$filename = $file->getClientOriginalName(); $filename = $file->getClientOriginalName();
$ext = $file->getClientOriginalExtension(); $ext = $file->getClientOriginalExtension();
if($ext != 'jpg' || $file->getMimeType() != 'image/jpeg') { if($ext != 'jpg' || $file->getMimeType() != 'image/jpeg') {
return new JsonResponse(['success' => false, 'message' => "Image not image/jpeg"], 400); return new JsonResponse(['success' => false, 'message' => "Image not image/jpeg but " . $file->getMimeType() . " (".$ext.")"], 400);
} }