Symfony 5.4 - Flysystem Driver for ElfinderVolume does not exist

287 Views Asked by At

My environment:

  • Symfony 5.4
  • Php version 7.4
  • Installed packages and versions :
"aws/aws-sdk-php": "^3.238",
"helios-ag/fm-elfinder-bundle": "^12.1",
"league/flysystem": "^2.5",
"league/flysystem-aws-s3-v3": "^2.5",
"league/flysystem-bundle": "^2.2",

Context: I have a Media Library on my app which stores media on the Ceph cloud (aws system) with flysystem. If I save a media from the Media Library this is uploaded directly on the cloud and the media CRUD works well. In order to get the uploaded media from the editor fields, I use Image2 plugin by ckeditor and the fm_elfinder.yaml with the flysystem driver config.

Problem: When I browse the cloud from the Image2 plugin, I get the error : {"error":["errConf","errNoVolumes"],"debug":["Driver "elFinderVolumeFlysystem" does not exist"]}

If I use the default LocalFileSystem driver, my configuration works well.

I have already tried to install the composer package barryvdh/elfinder-flysystem-driver, but I get the error because the aivailable package runs only on php 8.0
I can't install version ^1.0 of league/flysystem-aws-s3-v3 because of incompatibility with my php version.

- Have you some tips/solutions to solve the problem ?
- Is there someone have already developed a **php 7.4** custom Flysystem driver for elfinder ? 

I share my fm_elfinder.yaml config :
type and adapter_service items are not mandatory (maybe useless on this config, options and its params is enough).    

             roots:
                uploads:
                    show_hidden: false # defaults to false, hides dotfiles
                    driver: Flysystem
                    url: '%endpoint%'
                    #path: uploads/media
                    #autoload: true
                    alias: Médiathèque
                    flysystem:
                        type: aws_s3_v3
                        adapter_service: ''
                        options:
                            aws_s3_v3:
                                key: '%key%'
                                secret: '%secret%'
                                region: '%region%'
                                version: '%version%'
                                bucket_name: '%bucket%'
                                #optional_prefix: ~
                                endpoint: '%endpoint%'
                                use_path_style_endpoint: true

Thank you for your help guys !
1

There are 1 best solutions below

0
On

Try composer require barryvdh/elfinder-flysystem-driver