diff --git a/src/ElfinderController.php b/src/ElfinderController.php index f4b4dc7..b8027c4 100644 --- a/src/ElfinderController.php +++ b/src/ElfinderController.php @@ -104,12 +104,15 @@ public function showConnector() 'driver' => 'Flysystem', 'filesystem' => $disk->getDriver(), 'alias' => $key, - 'URLCallback' => function($path) use ($disk) { - return $disk->url($path); - }, 'accessControl' => $this->app->config->get('elfinder.access') // filter callback (OPTIONAL) ]; - $roots[] = array_merge($defaults, $root); + $root = array_merge($defaults, $root); + if (!isset($root['URL'])) { + $root['URLCallback'] = function($path) use ($disk) { + return $disk->url($path); + }; + } + $roots[] = $root; } } }