Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
164 lines (120 sloc) 3.55 KB

Cloud storage providers

One of the core feature of Flysystem is its ability to interact easily with remote filesystems, including many cloud storage providers. This bundle provides the same level of support for these cloud providers by providing corresponding adapters in the configuration.

Azure

Installation

composer require league/flysystem-azure-blob-storage

Usage

# config/packages/flysystem.yaml

flysystem:
    storages:
        users.storage:
            adapter: 'azure'
            options:
                client: 'azure_client_service' # The service ID of the MicrosoftAzure\Storage\Blob\BlobRestProxy instance
                container: 'container_name'
                prefix: 'optional/path/prefix'

AWS S3

Installation

composer require league/flysystem-aws-s3-v3

Usage

# config/packages/flysystem.yaml

flysystem:
    storages:
        users.storage:
            adapter: 'aws'
            options:
                client: 'aws_client_service' # The service ID of the Aws\S3\S3Client instance
                bucket: 'bucket_name'
                prefix: 'optional/path/prefix'

DigitalOcean Spaces

The DigitalOcean Spaces are compatible with the AWS S3 API, meaning that you can use the same configuration as for a AWS storage.

Scaleway Object Storage

The Scaleway Object Storage is compatible with the AWS S3 API, meaning that you can use the same configuration as for a AWS storage.

Dropbox

Installation

composer require spatie/flysystem-dropbox

Usage

# config/packages/flysystem.yaml

flysystem:
    storages:
        users.storage:
            adapter: 'dropbox'
            options:
                client: 'dropbox_client_service' # The service ID of the Spatie\Dropbox\Client instance
                prefix: 'optional/path/prefix'

Google Cloud Storage

Installation

composer require superbalist/flysystem-google-storage

Usage

# config/packages/flysystem.yaml
 
flysystem:
    storages:
        users.storage:
            adapter: 'gcloud'
            options:
                client: 'gcloud_client_service' # The service ID of the Google\Cloud\Storage\StorageClient instance
                bucket: 'bucket_name'
                prefix: 'optional/path/prefix'
                api_url: 'https://storage.googleapis.com'

Rackspace

Installation

composer require league/flysystem-rackspace

Usage

# config/packages/flysystem.yaml
 
flysystem:
    storages:
        users.storage:
            adapter: 'rackspace'
            options:
                container: 'rackspace_container_service' # The service ID of the OpenCloud\ObjectStore\Resource\Container instance
                prefix: 'optional/path/prefix'

WebDAV

Installation

composer require league/flysystem-webdav

Usage

# config/packages/flysystem.yaml
 
flysystem:
    storages:
        users.storage:
            adapter: 'webdav'
            options:
                client: 'webdav_client_service' # The service ID of the Sabre\DAV\Client instance
                prefix: 'optional/path/prefix'
                use_stream_copy: false

Next

Interacting with FTP and SFTP servers

You can’t perform that action at this time.