barryvdh / laravel-elfinder

elFinder bundle for Laravel
738 stars 171 forks source link

Not get s3 url after upload file. #278

Open henrysource opened 4 years ago

henrysource commented 4 years ago

I am using this package with ckeditor4 insert image.

config setting as below

    'disks' => [
        'files' => [
            'alias' => 'Disk',
            'URL' => env('AWS_URL').'files',
            'visibility' => 'public',
        ],
    ],

s3 policy setting as below

{
    "Version": "2012-10-17",
    "Id": "Policy1487302980778",
    "Statement": [
        {
            "Sid": "Stmt1487302965502",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::[bucket]/*"
        }
    ]
}

After i upload image via elfinder window and select to insert image. it will give image path as elfinder connector url like http://xxx.xx/elfinder/connector?_token=xxx. it should be s3 url.

If i close elfinder window and open it and select image again. it will give s3 path.

How to solve this problem ?

Thanks.

ojha007 commented 3 years ago

any updates i am having same issues

kunleadeoye commented 3 years ago

I have same issue, any solution ?

SandipDeshmukh commented 2 years ago

set the visibility in config/filesystem.php

's3' => [ 'driver' => 's3', 'key' => env('AWS_KEY'), 'secret' => env('AWS_SECRET'), 'region' => ('AWS_REGION'), 'bucket' => env('AWS_BUCKET'), 'visibility' => 'public', ],