Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FerchoCarcho opened this issue Jun 30, 2016 · 1 comment
Open

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

FerchoCarcho opened this issue Jun 30, 2016 · 1 comment

Comments

@FerchoCarcho
Copy link

FerchoCarcho commented Jun 30, 2016

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

@simogeo
Copy link
Owner

simogeo commented Jul 20, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants