PHPackages                             wearesho-team/yii2-filesystem - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. wearesho-team/yii2-filesystem

ActiveLibrary[File &amp; Storage](/categories/file-storage)

wearesho-team/yii2-filesystem
=============================

Yii2 integration for league/flysystem

5.2.3(12mo ago)0852[2 PRs](https://github.com/wearesho-team/yii2-filesystem/pulls)1MITPHPPHP &gt;=8.4CI failing

Since Dec 22Pushed 12mo ago3 watchersCompare

[ Source](https://github.com/wearesho-team/yii2-filesystem)[ Packagist](https://packagist.org/packages/wearesho-team/yii2-filesystem)[ RSS](/packages/wearesho-team-yii2-filesystem/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (8)Versions (26)Used By (1)

Yii2 Filesystem
===============

[](#yii2-filesystem)

[![Test & Lint](https://github.com/wearesho-team/yii2-filesystem/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/wearesho-team/yii2-filesystem/actions/workflows/php.yml)[![Latest Stable Version](https://camo.githubusercontent.com/dcd6a5fa69d0abab02e9eca652d64dfc75eb5f116dbc3abdbcfb4802f9924e6c/68747470733a2f2f706f7365722e707567782e6f72672f776561726573686f2d7465616d2f796969322d66696c6573797374656d2f762f737461626c65)](https://packagist.org/packages/wearesho-team/yii2-filesystem)[![Total Downloads](https://camo.githubusercontent.com/7e7c9130856d66ee0257b9d26eec70d0463738fa26e861e87537a3aa17f77bfe/68747470733a2f2f706f7365722e707567782e6f72672f776561726573686f2d7465616d2f796969322d66696c6573797374656d2f646f776e6c6f616473)](https://packagist.org/packages/wearesho-team/yii2-filesystem)[![codecov](https://camo.githubusercontent.com/21abf34728eeb328793f106e7a0740df53886f3badecece3aecf1eca205506b6/68747470733a2f2f636f6465636f762e696f2f67682f776561726573686f2d7465616d2f796969322d66696c6573797374656d2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/wearesho-team/yii2-filesystem)[![License](https://camo.githubusercontent.com/c2e5eff23551e2b92d8843bd5fb01cab10812cf08d6511555af9bf091e8f848b/68747470733a2f2f706f7365722e707567782e6f72672f776561726573686f2d7465616d2f796969322d66696c6573797374656d2f6c6963656e7365)](https://packagist.org/packages/wearesho-team/yii2-filesystem)

Integration of [league/flysystem](https://github.com/thephpleague/flysystem) for Yii2.

It is configured by environment variables by default. Available integration out-of-box:

- [Local](./src/Local) - should be used for development
- [S3](./src/S3) - should be used in production

Configuring
-----------

[](#configuring)

By-default configuring available using environment variables. To choose which integration to use you need to configure **FILESYSTEM\_ADAPTER** variable. Available values: *local*, *s3*. (or another, if you use custom bootstrap configuration)

### Configuring S3 adapter

[](#configuring-s3-adapter)

VariableRequiredDefaultDescriptionS3\_ENDPOINTyesendpoint url (with http/https)S3\_REGIONyesExample: *eu-central-1*S3\_BUCKETyesExample: *yourcompany*S3\_PREFIXnoempty stringpath prefix### Configuring Local adapter

[](#configuring-local-adapter)

VariableRequiredDefaultDescriptionFILESYSTEM\_LOCAL\_SAVE\_PATHyespath to save file on local machineUsage
-----

[](#usage)

### Bootstrap

[](#bootstrap)

To start use this package out-of-box you need to append [Bootstrap](./src/Bootstrap.php)into your Yii2 application.

```
