barryvdh / laravel-elfinder

elFinder bundle for Laravel
745 stars 171 forks source link

Flysystem on local disk not create thumbnail images #190

Closed hungnm144 closed 7 years ago

hungnm144 commented 7 years ago

I'm using Flysystem adapters as local disks. this my config: 'disks' => [ 'local' => [ 'alias' => 'DISK', 'path' => 'public/media', 'URL' => 'storage/media', 'tmbPath' => storage_path('app/public/media/.tmb') ] ] All images are saved in the folder "storage/app/public/media" and they can be view from browser normally. But thumbnail images are not working. Directory tmbPath (.tmb) has been created successfully but this folder is empty. How i can fix it :( elfinder 2 0

dcygan commented 7 years ago

Add in config/elfinder.php :

'root_options' => array(
        'tmbURL' => '/storage/tmb/',
        'tmbPath' => storage_path('app/public/tmb'),
    ),
the94air commented 7 years ago

:+1:

hungnm144 commented 7 years ago

Wow, thanks for your support. I've tried and everything working 👍

garbinmarcelo commented 7 years ago

I have my settings this way:

'root_options' => array(
        //'imgLib'      => 'gd',
        'uploadAllow' => array('image/png', 'image/jpeg', 'image/gif'),
        'uploadDeny'  => array('all'),
        'uploadOrder' => array('deny', 'allow'),
        'URL'     => env('APP_URL').'/storage/uploads',
        'tmbUrl'  => env('APP_URL').'/storage/uploads/.tmb',
        'tmbPath' => storage_path('app/public/uploads/.tmb'),
        'attributes' => [
            [
                'pattern' =>  '/\.tmb$/',
                'hidden' => true
            ]
        ]
    ),

It does not work at all. Some help? @dcygan

hungnm144 commented 7 years ago

First, you must create a symbolic link from storage/app/public/uploads to public Run php artisan storage:link And edit your elfinder config at config/elfinder.php. try :

'disks' => [
        'local' => [
            'alias' => 'LOCAL DISK',
            'path' => 'public/uploads',
            'URL' => '/storage/uploads'
        ]
    ],
'root_options' => array(
        'uploadAllow' => array('image/png', 'image/jpeg', 'image/gif'),
        'uploadDeny'  => array('all'),
        'uploadOrder' => array('deny', 'allow'),
        'tmbUrl'  => env('APP_URL').'/storage/uploads/.tmb',
        'tmbPath' => storage_path('app/public/uploads/.tmb'),
        'attributes' => [
            [
                'pattern' =>  '/\.tmb$/',
                'hidden' => true
            ]
        ]
    ),

@marcelogarbin

vahidalvandi commented 5 years ago

First, you must create a symbolic link from storage/app/public/uploads to public Run php artisan storage:link And edit your elfinder config at config/elfinder.php. try :

'disks' => [
        'local' => [
            'alias' => 'LOCAL DISK',
            'path' => 'public/uploads',
            'URL' => '/storage/uploads'
        ]
    ],
'root_options' => array(
        'uploadAllow' => array('image/png', 'image/jpeg', 'image/gif'),
        'uploadDeny'  => array('all'),
        'uploadOrder' => array('deny', 'allow'),
        'tmbUrl'  => env('APP_URL').'/storage/uploads/.tmb',
        'tmbPath' => storage_path('app/public/uploads/.tmb'),
        'attributes' => [
            [
                'pattern' =>  '/\.tmb$/',
                'hidden' => true
            ]
        ]
    ),

@marcelogarbin

not work for me ..

mjoris commented 2 years ago

i have been testing your 'root_options' for some other scenario it must be 'tmbURL' => env('APP_URL') . '/storage/uploads/.tmb', in stead of 'tmbUrl' => env('APP_URL') . '/storage/uploads/.tmb', a nasty typo ... moreover 'tmbPath' seems not to work without 'tmbURL'