mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Merge pull request #14884 from marcusmoore/fix/actionlogcontroller-fix
Fixed missing `}`
This commit is contained in:
commit
cd5bef414c
|
@ -17,22 +17,24 @@ class ActionlogController extends Controller
|
||||||
|
|
||||||
$disk = config('filesystems.default');
|
$disk = config('filesystems.default');
|
||||||
switch (config("filesystems.disks.$disk.driver")) {
|
switch (config("filesystems.disks.$disk.driver")) {
|
||||||
case 's3':
|
case 's3':
|
||||||
$file = 'private_uploads/signatures/'.$filename;
|
$file = 'private_uploads/signatures/'.$filename;
|
||||||
return redirect()->away(Storage::disk($disk)->temporaryUrl($file, now()->addMinutes(5)));
|
return redirect()->away(Storage::disk($disk)->temporaryUrl($file, now()->addMinutes(5)));
|
||||||
default:
|
default:
|
||||||
$this->authorize('view', \App\Models\Asset::class);
|
$this->authorize('view', \App\Models\Asset::class);
|
||||||
$file = config('app.private_uploads').'/signatures/'.$filename;
|
$file = config('app.private_uploads').'/signatures/'.$filename;
|
||||||
$filetype = Helper::checkUploadIsImage($file);
|
$filetype = Helper::checkUploadIsImage($file);
|
||||||
|
|
||||||
$contents = file_get_contents($file, false, stream_context_create(['http' => ['ignore_errors' => true]]));
|
$contents = file_get_contents($file, false, stream_context_create(['http' => ['ignore_errors' => true]]));
|
||||||
if ($contents === false) {
|
if ($contents === false) {
|
||||||
Log::warning('File '.$file.' not found');
|
Log::warning('File '.$file.' not found');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return Response::make($contents)->header('Content-Type', $filetype);
|
return Response::make($contents)->header('Content-Type', $filetype);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getStoredEula($filename){
|
public function getStoredEula($filename){
|
||||||
$this->authorize('view', \App\Models\Asset::class);
|
$this->authorize('view', \App\Models\Asset::class);
|
||||||
$file = config('app.private_uploads').'/eula-pdfs/'.$filename;
|
$file = config('app.private_uploads').'/eula-pdfs/'.$filename;
|
||||||
|
|
Loading…
Reference in a new issue