Closed hungnm144 closed 7 years ago
Add in config/elfinder.php :
'root_options' => array(
'tmbURL' => '/storage/tmb/',
'tmbPath' => storage_path('app/public/tmb'),
),
:+1:
Wow, thanks for your support. I've tried and everything working 👍
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
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
First, you must create a symbolic link from
storage/app/public/uploads
topublic
Runphp artisan storage:link
And edit your elfinder config atconfig/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 ..
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'
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 :(