Skip to content

How to use custom filesystem service (flysystem adapter)

Al Ganiev edited this page Jun 16, 2016 · 1 revision

Extend/override ElFinderConfigurationReader class and add

case 'custom':
     $service = $this->container->get($serviceName);

     if (is_object($service) && $service instanceof Filesystem) {
           $filesystem = $service;
     }

     if (is_object($service) && $service instanceof AdapterInterface) {
           $filesystem = new Filesystem($service);
     }

     break;

config.yml

Add the following configuration

oneup_flysystem:
    adapters:
        adiuvo_cms_adapter_public:
            rackspace:
                lazy: true
                container: adiuvo_cms.opencloud_public_container

    filesystems:
        adiuvo_cms_public:
            adapter: adiuvo_cms_adapter_public
            alias: filesystem_public
            plugins:
              - adiuvo_cms.flysystem.plugin.rackspace_public_url
Clone this wiki locally