Keep Id and better error

This commit is contained in:
Ruben 2016-09-12 17:59:41 +01:00
parent 0afa1297e9
commit 2072ba5744

View file

@ -160,7 +160,7 @@ class ScoreControllerProvider implements ControllerProviderInterface
}
}
foreach($request->files->all() as $file) {
foreach($request->files->all() as $id => $file) {
/* @var $file \Symfony\Component\HttpFoundation\File\UploadedFile */
$filename = $file->getClientOriginalName();
$ext = $file->getClientOriginalExtension();
@ -175,7 +175,7 @@ class ScoreControllerProvider implements ControllerProviderInterface
list($hit_id, $part) = \explode('-', $id_string);
if(!in_array($part, $valid_parts)) {
return new JsonResponse(['success' => false, 'message' => "unknown face part."], 400);
return new JsonResponse(['success' => false, 'message' => "unknown face part '$part'"], 400);
}
/* @var $hit Models\Hit */