Filemanager icon indicating copy to clipboard operation
Filemanager copied to clipboard

Need to Reach a Laravel Route before Accessing Filemanager.

Open FerchoCarcho opened this issue 9 years ago • 1 comments

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

FerchoCarcho avatar Jun 30 '16 14:06 FerchoCarcho

Not familiar with Laravel .... Have no idea. Sorry. Please, let us know if progressing on that

simogeo avatar Jul 20 '16 09:07 simogeo