mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-03 11:34:51 +01:00
bump to php 8
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Helpers\SettingsHelper;
|
||||
use GuzzleHttp\Psr7\MimeType;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
@@ -21,7 +22,7 @@ Route::get(SettingsHelper::getBase() . 'files/{path?}', function ($file) {
|
||||
$fileP = public_path() . '/' . $fileP;
|
||||
if (file_exists($fileP)) {
|
||||
$contents = File::get($fileP);
|
||||
$mime = \GuzzleHttp\Psr7\mimetype_from_filename($fileP);
|
||||
$mime = MimeType::fromFilename($fileP);
|
||||
return Response::make(File::get($fileP), 200, ['Content-type' => $mime]);
|
||||
} else {
|
||||
abort(404);
|
||||
|
||||
Reference in New Issue
Block a user