thephpleague / flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications
https://github.com/thephpleague/flysystem
MIT License
365 stars 68 forks source link

Register a stream wrapper for each registered filesystem #96

Open dkarlovi opened 2 years ago

dkarlovi commented 2 years ago

For example

flysystem:
    storages:
        default.storage:
            adapter: 'local'
            options:
                directory: '%kernel.project_dir%/var/storage/default'

flysystem+default.storage://foo/bar/bat.csv points to %kernel.project_dir%/var/storage/default/foo/bar/bar/csv.

Similar to https://github.com/twistor/flysystem-stream-wrapper, but up to date.

This wrapper works with recent Flysystem: https://github.com/m2mtech/flysystem-stream-wrapper

Thinking about it further, it seems like a thing which could be opted-in per filesystem, something like

flysystem:
    storages:
        some.storage:
            adapter: 'asyncaws'
            stream_wrapper: true
maxhelias commented 3 months ago

See this comment, it might be a good start : https://github.com/thephpleague/flysystem/issues/1602#issuecomment-2288315642