burzum / cakephp-file-storage

Abstract file storage and upload plugin for CakePHP. Write to local disk, FTP, S3, Dropbox and more through a single interface. It's not just yet another uploader but a complete storage solution.
MIT License
197 stars 84 forks source link

Class could be found #199

Closed squalltua closed 5 years ago

squalltua commented 5 years ago

I follow the installation step. In step CakePHP Bootstrap Clean installation, No code, Just installed the plugin

use Burzum\FileStorage\Lib\FileStorageUtils;
use Burzum\FileStorage\Lib\StorageManager;
use Burzum\FileStorage\Event\ImageProcessingListener;
use Burzum\FileStorage\Event\LocalFileStorageListener;

They class could not found.

Version

PS Migrating from File Storage v1 to v2 page in the document has gone.

burzum commented 5 years ago

Well... which class exactly?

The listeners are here: https://github.com/burzum/cakephp-file-storage/tree/2.0/src/Storage/Listener

Looks like the migration guide is incomplete.

squalltua commented 5 years ago

I don't know. I just follow doc.

image

burzum commented 5 years ago

Try using the listeners from here.

https://github.com/burzum/cakephp-file-storage/tree/2.0/src/Storage/Listener

squalltua commented 5 years ago

Yes. work no error and I think the document need update.

I changed

use Burzum\FileStorage\Event\ImageProcessingListener;
use Burzum\FileStorage\Event\LocalFileStorageListener;

instand to

use Burzum\FileStorage\Storage\Listener\LocalListener;
use Burzum\FileStorage\Storage\Listener\ImageProcessingListener;

and fixed

$listener = new LocalListener();
EventManager::instance()->on($listener);

But i'm not sure is work fine or not.