2

I want to add Amazon S3 filesystem to my Yii2 Elfinder plugin. So I installed these plugins to my app:

composer require league/flysystem 
composer require league/flysystem-aws-s3-v3 
composer require creocoder/yii2-flysystem 
composer require mihaildev/yii2-elfinder 
composer require mihaildev/yii2-elfinder-flysystem

Then I added this configuration:

'components' => [
   // ... 
    'fs' => [
        'class' => 'common\components\AwsS3Filesystem',
        'key' => '{MYAMAZONKEY}',
        'secret' => '{MYAMAZONSECRET}',
        'bucket' => '{MYBUCKET}',
        'region' => 'us-east-1',
    ],
        // ...
],

Then my elfinder configuration:

'controllerMap' => [
        'elfinder' => [
            'class' => 'mihaildev\elfinder\PathController',
            'access' => ['@'],
            'disabledCommands' => ['netmount'],
            'root' => [
                'class' => 'mihaildev\elfinder\flysystem\Volume',
                'component' => 'fs'
            ],
        ]
    ],

After all, when I open the elfinder window this error happens:

Invalid backend configuration.
Readable volumes not available.
{"error":["errConf","errNoVolumes"],"debug":["Driver \"elFinderVolumeFlysystem\" does not exist"]}

Actually I followed this tutorial, but it didn't help. I can't figure out what's problem. Any help appreciated.

Shaig Khaligli
  • 4,955
  • 5
  • 22
  • 32

0 Answers0