mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Show the exception message if APP_DEBUG is enabled.
This commit is contained in:
parent
ee1f983114
commit
278be52f7b
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue