Skip to main content

Installation & Configuration

This chapter describes how to install and configure the bundle.

info

Most of the information under rekalogika/file-bundle is applicable only to Symfony applications. If you are not using Symfony, please refer to the rekalogika/file documentation instead.

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Open a command console, enter your project directory, and execute:

composer require rekalogika/file-bundle

Configuration

The bundle should work out of the box without configuration. By default, it will create a filesystem identified by 'default' that stores files in the directory %kernel.project_dir%/var/storage/default.

The following is the default configuration:

config/packages/rekalogika_file.yaml
rekalogika_file:
filesystems:
# our default filesystem service
default: rekalogika.file.default_filesystem

default_filesystem_directory: '%kernel.project_dir%/var/storage/default'

Integration With Flysystem Bundle

If you are using the Flysystem bundle, you can use the filesystems defined in the Flysystem bundle:

config/packages/rekalogika_file.yaml
rekalogika_file:
filesystems:
# 'default.storage' is the filesystem key under 'flysystem.storages'
# in config/packages/flysystem.yaml
default: 'default.storage'