Show the exception message if APP_DEBUG is enabled.

This commit is contained in:
Daniel Meltzer 2016-06-27 23:54:45 -04:00
parent ee1f983114
commit 278be52f7b

View file

@ -840,6 +840,9 @@ class AssetsController extends Controller
$file->move($path, $date.'-'.$fixed_filename);
} catch (\Symfony\Component\HttpFoundation\File\Exception\FileException $exception) {
$results['error']=trans('admin/hardware/message.upload.error');
if( config('app.debug')) {
$results['error'].= ' ' . $exception->getMessage();
}
return $results;
}
$name = date('Y-m-d-his').'-'.$fixed_filename;