// ... configuration
$s3Adapter = new AwsS3Adapter($s3Client, $bucketName);
return new Filesystem($s3Adapter, [
'visibility' => AdapterInterface::VISIBILITY_PUBLIC,
]);
When filesystem is mounted, it's wrapped into CachedAdapter (because AwsS3Adapter is not the descendant of League\Flysystem\Cached\CachedAdapter) in Driver::init() method.
In this method, property $fs is replaced: $this->fs = new Filesystem($adapter);.
But this effectively drops the "visibility" configuration.
Proposed change add original filesystem configuration into newly created filesystem.
closes #73
Considering following filesystem configuration:
When filesystem is mounted, it's wrapped into
CachedAdapter
(becauseAwsS3Adapter
is not the descendant ofLeague\Flysystem\Cached\CachedAdapter
) inDriver::init()
method.In this method, property
$fs
is replaced:$this->fs = new Filesystem($adapter);
. But this effectively drops the "visibility" configuration.Proposed change add original filesystem configuration into newly created filesystem.