There is a bug in https://github.com/barryvdh/elfinder-flysystem-driver package, that overrides default service and removes permissions for a file. See https://github.com/barryvdh/elfinder-flysystem-driver/issues/73
This creates problems with s3 service, because we need to set permission for every file. Because SSFW overrides original file with that method I have no idea, how to override your class and fix this issue.
I'm able to save the file to s3 with correct permissions.
Hi @henzigo,
thanks for filling the issue. First I wanted to include some fix into the framework and I was able to come with several ways how to fix it, but none of them was "good".
init method in our implementation in VolumeDriver class, but do it without thorough testing and deeply understanding the problem (how the plugins works? what is glideUrl and how to work with it? and more) is unpleasant to me$this->options['cache'] to false (disable caching completely) in our init method. Do we really want to disable caching for everyone, when one specific use case causes problem?I assume your filesystem is configured somehow like this
$s3Adapter = new AwsS3Adapter($s3Client, $bucketName);
return new Filesystem($s3Adapter, [
'visibility' => AdapterInterface::VISIBILITY_PUBLIC,
]);
And this cause troubles because elfinder-flysystem-driver drops the visibility configuration.

You can however create filesystem with cached adapter and bypass the creating cached one in elfinder-flysystem-driver library.
Something like this works:
$s3Adapter = new AwsS3Adapter($s3Client, $bucketName);
+ $cachedAdapter = new CachedAdapter($s3Adapter, new \League\Flysystem\Cached\Storage\Memory());
- return new Filesystem($s3Adapter, [
+ return new Filesystem($cachedAdapter, [
'visibility' => AdapterInterface::VISIBILITY_PUBLIC,
]);

https://github.com/barryvdh/elfinder-flysystem-driver/pull/75 was merged to master, but a new version is not yet released.
This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because there was no acivity within the last half a year.
Most helpful comment
Hi @henzigo,
thanks for filling the issue. First I wanted to include some fix into the framework and I was able to come with several ways how to fix it, but none of them was "good".
I created PR https://github.com/barryvdh/elfinder-flysystem-driver/pull/75, but the last release was in 2017, so fingers crossed.
initmethod in our implementation inVolumeDriverclass, but do it without thorough testing and deeply understanding the problem (how the plugins works? what is glideUrl and how to work with it? and more) is unpleasant to me$this->options['cache']to false (disable caching completely) in ourinitmethod. Do we really want to disable caching for everyone, when one specific use case causes problem?I assume your filesystem is configured somehow like this
And this cause troubles because
elfinder-flysystem-driverdrops the visibility configuration.You can however create filesystem with cached adapter and bypass the creating cached one in
elfinder-flysystem-driverlibrary.Something like this works: