mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-25 10:20:38 +00:00
format
This commit is contained in:
@@ -13,12 +13,12 @@ class GetFileController extends Controller
|
||||
public function __construct(
|
||||
private RecordDownloadAction $recordDownload,
|
||||
private DownloadFileAction $downloadFile,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
string $filename,
|
||||
): BinaryFileResponse {
|
||||
|
||||
$file = UserFile::withTrashed()
|
||||
->where('basename', $filename)
|
||||
->firstOrFail();
|
||||
|
||||
@@ -13,13 +13,13 @@ class GetThumbnailController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private DownloadThumbnailAction $downloadThumbnail,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
Request $request,
|
||||
string $filename,
|
||||
): FileNotFoundException | StreamedResponse {
|
||||
|
||||
$originalFileName = substr($filename, 3);
|
||||
|
||||
$file = File::withTrashed()
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
namespace Domain\Files\Controllers;
|
||||
|
||||
use Domain\Files\Models\File;
|
||||
use Gate;
|
||||
use Domain\Files\Models\File;
|
||||
use Illuminate\Http\Response;
|
||||
use Domain\Sharing\Models\Share;
|
||||
use Domain\Files\Resources\FileResource;
|
||||
use Domain\Sharing\Actions\ProtectShareRecordAction;
|
||||
|
||||
/**
|
||||
* Get shared file record
|
||||
@@ -16,7 +15,6 @@ class VisitorShowFileController
|
||||
public function __invoke(
|
||||
Share $shared
|
||||
): Response {
|
||||
|
||||
$file = File::whereUserId($shared->user_id)
|
||||
->whereId($shared->item_id)
|
||||
->firstOrFail();
|
||||
|
||||
Reference in New Issue
Block a user