Open delatbabel opened 7 years ago
As a point of reference, this does not work:
'roots' => [
[
'driver' => 'Flysystem',
'glideURL' => '/glide_images',
// 'glideKey' REDACTED
'alias' => 'S3 Flysystem',
'filesystem' => new Filesystem(new AwsS3Adapter(
new S3Client([
'credentials' => [
'key' => env('AWS_S3_KEY', 'your-key'),
'secret' => env('AWS_S3_SECRET', 'your-secret'),
],
'region' => env('AWS_S3_REGION', 'your-region'),
]),
env('AWS_S3_BUCKET', 'your-bucket')
)),
],
],
... it throws errors in Illuminate\Container\Container->make('log', ...)
no doubt because the log object in the application container hasn't yet been initialised.
As an alternative, trying this throws the same error:
'roots' => [
[
'driver' => 'Flysystem',
'glideURL' => '/glide_images',
// 'glideKey' REDACTED
'alias' => 'S3 Flysystem',
'filesystem' => app('filesystem')->disk(),
],
],
OK I found a couple of things:
Glide integration does not work on the current released version. I switched to using dev-master and using my original config (setting disks but leaving roots null) the preview images are now working using Glide. I can see some changes that were made in Driver.php since the release version and now -- can these please be tagged? The MIME type wasn't being set by the S3 driver and so _stat()
wasn't calling getUrl()
Despite that Glide integration is now working, I still can't see image icons when I view a folder in elfinder, I'm just presented with the default "panda" image icon. I can see that $stat["tmb"]
is being set correctly, but not being used.
Has anyone gotten image icons to work?
So thumbnails work? Or which icons do you mean?
To make it clear, these are the thumbnails that I see for all images:
https://salsa.babel.com.au/owncloud/index.php/s/7YCnZXhHrkuIiOz
When I open an info box for an image I see this:
https://salsa.babel.com.au/owncloud/index.php/s/nMCvj0A8rjp1lJt
The Link in that info box is the correct link to the file including the Glide URL. This is the information that I have that Glide integration is working (I also added a bunch of Log::debug statements in the Driver.php code to ensure that the _stat() function is doing the right thing, which it is).
I've encountered the same issue. I think it's a problem in ElFinder and I've submitted a pull request for it. https://github.com/Studio-42/elFinder/pull/2283
As @delatbabel said, the glide thumbnails urls are correct. They're just not being loaded.
Hi, more a question or set of questions than an issue.
Like a lot of people I guess I have a combination of requirements including Laravel app + elfinder + S3 storage + Glide.
I have most of it working. My config files look like this:
config/filesystems.php
I have the necessary AWSS3* values stored in
.env
.config/elfinder.php
For the elfinder config I have gone with the suggestion of leaving roots null and setting up the disks array instead.
... I also have a properly working Glide installation as evidenced by being able to access images from Flysystem using the /glide_images URL.
The only thing that's not working is the elfinder/Glide integration. As per the README file in laravel-elfinder:
So everything is working except that I don't see any thumbnails generated by Glide, and I can't see any access to the Glide URL (as I watch the server logs) while I'm operating elfinder. elfinder access to the files in Flysystem are working and I can use the Laravel Storage facade to access/modify/delete these files without problems. Also within my Glide ImageController I have been able to inject the Laravel Filesystem contract to create the Glide
ServerFactory
which is working well.Questions:
Is the config with the
glideUrl
parameter supplied underdisks
supposed to work? Should I be providing the config for the Flysystem storage underroots
instead?Can I somehow rely on just the flysystem configuration in
config/filesystems.php
to give me all of the necessary flysystem config for elfinder or do I have to duplicate that intoconfig/elfinder.php
to pass all of the necessary options for (e.g.) Glide integration?Assuming that I do have to duplicate the flysystem config into
config/elfinder.php
, what does a working config for S3 Flysystem access underroots
look like?Thanks,
Del