Yii Framework Forum: Storage manager - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Storage manager An extension to handle large file libraries Rate Topic: -----

#1 User is offline   x000000 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 07-January 14

Posted 20 July 2016 - 08:15 PM

Hi there. I wrote a composer package to handle large file libraries in my apps.
First of all, it's not an Yii2 extension because it has no Yii2 dependency, but it's works with Yii2 either.
All description from readme works without any changes, but the part about an instantiation of Storage object.

So, to make it works with Yii2, just install the package via composer:

php composer.phar require --prefer-dist x000000/storage-manager


and add a component to your config like this:

'storage' => function() {
    return new \x000000\StorageManager\Storage(
        // this is a full path to the directory where files will be stored in
        \Yii::getAlias('/path/to/the/storage/directory'),
        // this is a url to the directory above (how directory will be available by HTTP)
        '/static'
    );
},


Now the extension is installed and ready to work!

Important links:
  • Github repo with readme: x000000/storage-manager
  • Packagist package: x000000/storage-manager
  • Yii extension: maybe some day...

I'd like to hear your suggestions!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users