Skip to content

Need to Reach a Laravel Route before Accessing Filemanager. #500

@FerchoCarcho

Description

@FerchoCarcho

Hello, Im trying to integrate jwt-auth and also be able to use Filemanager
So my flow should be the following.
When User Clicks Browse.

  1. filebrowserBrowseUrl: '/images/browse'-> Laravel Route to fetch User Folder
    The response will be a hashed folder Name.
    2.having that hashed Name Run filemanager with ;
$fm = new Filemanager();
$fm->setFileRoot($folderPath); //where $folderPath will be the hashed name returned from laravel.

I cant Use a Custom user.config.php file where there I should pull a

require getcwd() . '/../../../../bootstrap/autoload.php';
$app = require_once getcwd() . '/../../../../bootstrap/app.php';

$kernel = $app->make('Illuminate\Contracts\Http\Kernel');

$response = $kernel->handle(
  $request = Illuminate\Http\Request::capture()
);

$id = $app['encrypter']->decrypt($_COOKIE[$app['config']['session.cookie']]);
$app['session']->driver()->setId($id);
$app['session']->driver()->start();

and then check for the user's permission because JWT doesnt Use Sessions/Cookies.

Ideally I will have
filebrowserBrowseUrl: '/images/browse/' - /filemanager/index.html' - 'hashed folder'
                                                  ↑                                   ↑                             ↑
                                        target route
                                       with the Route response execute this other route                                                                                                                                              with the hashed folder name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions