Clearer reporting on import

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-04-21 13:27:23 -07:00
parent 3855b74161
commit 54ef469d98

View file

@ -49,10 +49,11 @@ class ImportController extends Controller
if (!in_array($file->getMimeType(), array(
'application/vnd.ms-excel',
'text/csv',
'application/csv',
'text/plain',
'text/comma-separated-values',
'text/tsv'))) {
$results['error']='File type must be CSV';
$results['error']='File type must be CSV. Uploaded file is '.$file->getMimeType();
return response()->json(Helper::formatStandardApiResponse('error', null, $results['error']), 500);
}