ahmadbadpey's avatar

laravel elfinder does not work after renaming public folder to public_html on the server

I am using laravel-elfinder laravel package as a file Manager in laravel project.

To determine folder that all files uploaded to it , I used dir option in elfinder config file,that seems is relative to public project path.

I store all files on a directory named upload in public folder project and same on the server. but on the server I must use public_html.

Now , when I want to create an instances elfinder bellow error shown:

Invalid backend configuration. Readable volumes not available.

All things work on the localhost without any problem.

How do I must set dir option in elfinder config file?

0 likes
2 replies
TerrePorter's avatar

Did you tell Laravel to use the '/public_html' verses '/public' ?

The elfinder uses the app set public path, so you need to make sure that the path the app returns was updated. That is dependent on how you told the app there is a different public path.

Something like this would change the default public path.

App::bind('path.public', function() {
    return base_path().'/public_html';
});

Or you can use something like https://github.com/TerrePorter/LaravelFrameworkLoader to change the paths.

ahmadbadpey's avatar

I added this to index.php file in public_html directory :

$app->bind('path.public', function() {
        return base_path().'/public_html';
    });

But same error is Occured.

Is not any way to set root directory in elfinder config file ?

Please or to participate in this conversation.