mirror of
https://github.com/crivion/laranode.git
synced 2026-06-09 11:22:18 +08:00
upload file (chunks) complete
This commit is contained in:
@@ -12,12 +12,14 @@ use App\Actions\Filemanager\GetDirectoryContentsAction;
|
||||
use App\Actions\Filemanager\GetFileContentsAction;
|
||||
use App\Actions\Filemanager\RenameFileAction;
|
||||
use App\Actions\Filemanager\UpdateFileContentsAction;
|
||||
use App\Actions\Filemanager\UploadFileAction;
|
||||
use League\Flysystem\UnixVisibility\PortableVisibilityConverter;
|
||||
use Illuminate\Http\StreamedResponse;
|
||||
|
||||
class FilemanagerController extends Controller
|
||||
{
|
||||
public Filesystem $filesystem;
|
||||
public string $path;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -26,6 +28,7 @@ class FilemanagerController extends Controller
|
||||
$adapter = new LocalFilesystemAdapter($path, null, LOCK_EX, LocalFilesystemAdapter::DISALLOW_LINKS);
|
||||
|
||||
$this->filesystem = new Filesystem($adapter);
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
public function index()
|
||||
@@ -62,4 +65,9 @@ class FilemanagerController extends Controller
|
||||
{
|
||||
return (new DeleteFilesAction($this->filesystem))->execute($r);
|
||||
}
|
||||
|
||||
public function uploadFile(Request $r)
|
||||
{
|
||||
return (new UploadFileAction($this->path))->execute($r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user