Open rzdev opened 7 years ago
After fighting with this a couple of hours I managed to fix it, This is what I did:
Route:
Route::get('glide/{path}', 'GlideController@index')->where('path', '.+');
Controller: (i required league/glide-laravel )
public function index($path)
{
$server = ServerFactory::create([
'source' => app('filesystem')->disk('s3')->getDriver(),
'cache' => storage_path('glide'),
'cache_path_prefix' => '.cache',
]);
$server->setResponseFactory(new LaravelResponseFactory());
return $server->getImageResponse($path, Input::query());
}
elfinder.php
'disks' => [
's3' => [
'alias' => 'S3 Storage',
'glideURL' => '/glide',
],
],
(...)
'root_options' => array(
'tmbURL' => env('APP_URL'),
'tmbPath' => storage_path('/glide/.cache'),
),
php artisan storage:link
This trick works for me without Glide: 'tmbURL' => 'self'
. I am doing in PHP ( Not laravel ).
Config detail example: https://github.com/bayucandra/ckeditor-elfinder/blob/master/vendor/elFinder/php/connector.minimal.php
working demo: https://www.biqdev.com/demo/ckeditor-elfinder/
thumbnails are not being generated when using amazon S3, i have set the tmbURL and tmbURL but no success.
Are there any workaround?