wip stograge
This commit is contained in:
@@ -41,6 +41,20 @@ class FileController extends Controller
|
||||
return response()->file($disk->path("templates/".$templatePath));
|
||||
}
|
||||
|
||||
public function original(Request $request, string $disk)
|
||||
{
|
||||
$imagePath = $request->route("any");
|
||||
$disk = $this->fileService->loadDisk($disk);
|
||||
return response()->file($disk->path($imagePath));
|
||||
}
|
||||
|
||||
public function thumb(Request $request, string $disk)
|
||||
{
|
||||
$imagePath = "thumbs/".$request->route("any");
|
||||
$disk = $this->fileService->loadDisk($disk);
|
||||
return response()->file($disk->path($imagePath));
|
||||
}
|
||||
|
||||
public function download(Request $request)
|
||||
{
|
||||
$disk = $this->fileService->loadDisk();
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ use Lucent\Http\Controller\SetupController;
|
||||
|
||||
Route::get('/lucent/setup', [SetupController::class, 'setup']);
|
||||
Route::get('/storage/templates/{any}', [FileController::class, 'template'])->where('any', '.*');
|
||||
//Route::get('/storage/thumbs/{any}', [FileController::class, 'thumb'])->where('any', '.*');
|
||||
Route::get('/lfs-{disk}/thumbs/{any}', [FileController::class, 'thumb'])->where('any', '.*');
|
||||
Route::get('/lfs-{disk}/{disk}/{any}', [FileController::class, 'original'])->where('any', '.*');
|
||||
|
||||
Route::group([
|
||||
'middleware' => ['web'],
|
||||
|
||||
Reference in New Issue
Block a user