Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue connecting s3 bucket #67

Open
dmarcos89 opened this issue Feb 20, 2018 · 1 comment
Open

Issue connecting s3 bucket #67

dmarcos89 opened this issue Feb 20, 2018 · 1 comment

Comments

@dmarcos89
Copy link

Hi, i am having issues configuring my s3 bucket.
Not sure where exactly in the config it should go, disks? roots?

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Upload dir
    |--------------------------------------------------------------------------
    |
    | The dir where to store the images (relative from public)
    |
    */
    'dir' => ['Images'],

    /*
    |--------------------------------------------------------------------------
    | Filesystem disks (Flysytem)
    |--------------------------------------------------------------------------
    |
    | Define an array of Filesystem disks, which use Flysystem.
    | You can set extra options, example:
    |
    | 'my-disk' => [
    |        'URL' => url('to/disk'),
    |        'alias' => 'Local storage',
    |    ]
    */
    'disks' => [
        // 'uploads' => [
        //     'driver' => 'local',
        //     'root' => public_path('uploads'),
        // ],
        // 'public' => [
        //     'driver' => 'local',
        //     'root' => storage_path('app/public'),
        //     'url' => env('APP_URL').'/storage',
        //     'visibility' => 'public',
        // ],
        // 's3' => [
        //     'driver' => 's3',
        //     'key' => env('AWS_KEY'),
        //     'secret' => env('AWS_SECRET'),
        //     'region' => env('AWS_REGION'),
        //     'bucket' => env('AWS_BUCKET'),
        // ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Routes group config
    |--------------------------------------------------------------------------
    |
    | The default group settings for the elFinder routes.
    |
    */

    'route' => [
        'prefix'     => config('backpack.base.route_prefix', 'admin').'/elfinder',
        'middleware' => ['web', 'admin'], //Set to null to disable middleware filter
    ],

    /*
    |--------------------------------------------------------------------------
    | Access filter
    |--------------------------------------------------------------------------
    |
    | Filter callback to check the files
    |
    */

    'access' => 'Barryvdh\Elfinder\Elfinder::checkAccess',

    /*
    |--------------------------------------------------------------------------
    | Roots
    |--------------------------------------------------------------------------
    |
    | By default, the roots file is LocalFileSystem, with the above public dir.
    | If you want custom options, you can set your own roots below.
    |
    */

    'roots' => null,
    // 'roots' => [
    //     's3' => [
    //         'driver' => 's3',
    //         'key' => env('AWS_KEY'),
    //         'secret' => env('AWS_SECRET'),
    //         'region' => env('AWS_REGION'),
    //         'bucket' => env('AWS_BUCKET'),
    //     ],
    // ],

    /*
    |--------------------------------------------------------------------------
    | Options
    |--------------------------------------------------------------------------
    |
    | These options are merged, together with 'roots' and passed to the Connector.
    | See https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1
    |
    */

    'options' => [],

];

When placing it in roots:

Invalid backend configuration.
Readable volumes not available.

When placing it in disks:

Invalid backend response.
Error occurred on the server side.
HTTP error 500

Does my bucket need to have public access?
Any help will be much appreciated.
Thanks in advance!

@dmarcos89 dmarcos89 changed the title Issue connecting s3 Issue connecting s3 bucket Feb 20, 2018
@og6k
Copy link

og6k commented Apr 29, 2018

I am having this same issue, did you ever get it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants