mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Changed directory for audits image dir
This commit is contained in:
parent
5acd225f0f
commit
0e1dfcf408
|
@ -1020,7 +1020,7 @@ class AssetsController extends Controller
|
||||||
$file = $log->get_src('assets');
|
$file = $log->get_src('assets');
|
||||||
|
|
||||||
if ($log->action_type =='audit') {
|
if ($log->action_type =='audit') {
|
||||||
$file = $log->get_src('assets/audits');
|
$file = $log->get_src('audits');
|
||||||
}
|
}
|
||||||
|
|
||||||
$filetype = Helper::checkUploadIsImage($file);
|
$filetype = Helper::checkUploadIsImage($file);
|
||||||
|
@ -1328,7 +1328,7 @@ class AssetsController extends Controller
|
||||||
if ($request->hasFile('image')) {
|
if ($request->hasFile('image')) {
|
||||||
$file = $request->file('image');
|
$file = $request->file('image');
|
||||||
try {
|
try {
|
||||||
$destinationPath = config('app.private_uploads').'/assets/audits';
|
$destinationPath = config('app.private_uploads').'/audits';
|
||||||
$extension = $file->getClientOriginalExtension();
|
$extension = $file->getClientOriginalExtension();
|
||||||
$filename = 'audit-'.$asset->id.'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
|
$filename = 'audit-'.$asset->id.'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
|
||||||
$file->move($destinationPath, $filename);
|
$file->move($destinationPath, $filename);
|
||||||
|
|
2
storage/private_uploads/audits/.gitignore
vendored
Executable file
2
storage/private_uploads/audits/.gitignore
vendored
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
Loading…
Reference in a new issue