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

s3 url not displayed #69

Closed
og6k opened this issue May 3, 2018 · 1 comment
Closed

s3 url not displayed #69

og6k opened this issue May 3, 2018 · 1 comment

Comments

@og6k
Copy link

og6k commented May 3, 2018

When I config my s3, I get the wrong url call out as

http://mysite.com/elfinder/connector?_token=DE1hdPclHMyBabxoEu46bWIZG1tlorw3J35641yO&cmd=file&target=fls2_RnJvbnRfcGFnZS9tZWRpdGF0aW5nVW5pY29ybi5wbmc

I can upload and see files on my s3 bucket with no problem. The only thing is I can't see the url via my s3 url.

in my config file I have my disk displayed as:

` <?php

return array(

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

/*
|--------------------------------------------------------------------------
| 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' => env('FILESYSTEM_DRIVER', null),


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

'route' => [
    'prefix' => 'elfinder',
    'middleware' => 'web', //Set to null to disable middleware filter
],

'resource_url' => 'elfinder',

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

'access' => 'App\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,

/*
|--------------------------------------------------------------------------
| 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' => array(),

/*
|--------------------------------------------------------------------------
| Root Options
|--------------------------------------------------------------------------
|
| These options are merged, together with every root by default.
| See https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#root-options
|
*/
'root_options' => array(),

);
`

I set up the environment to use local and production filesystems.
my filesystem_driver is S3 for production.

I have been trying to figure out where to setup the url, but I can't figure it out. It still throws the connector?token= string.

How do I change the base url for s3 uploads?

@og6k og6k changed the title s3 url not working displayed s3 url not displayed May 3, 2018
@og6k
Copy link
Author

og6k commented May 4, 2018

I figured out that I had to add the URL to root array. And add public-read to the array.

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

1 participant