Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

beracah.kings's avatar

File Storage

Im hosting laravel in a shared server enviroment. public folder is under public_html and other files are in seperate folder.

Im unable to upload files to the public folder which I want to display. Is there any workaround to resolve this I get "League\Flysystem\Exception Impossible to create the root directory"

0 likes
3 replies
beracah.kings's avatar

I created a seperate disk under

      'my_files' => [
            'driver' => 'local',
            'root'   => '/home/domain/public_html'. '/myfiles',
        ],

Im able to to view /store images inside the myfiles directory. However is it safe to follow this procedure since laravel recommends to use symbolic link. I validate and allow .jpg/png files of the particular user to upload in the myfiles directory

beracah.kings's avatar

Thank you jlrdw. The images are of members, im saving them with random generated number stored in the db. Is this an ok practice.

Please or to participate in this conversation.