FriendsOfCake/cakephp-upload

Class 'League\Flysystem\Adapter\Local' not found

enviniom opened this issue · 2 comments

Hi.
I'm having this error "Class 'League\Flysystem\Adapter\Local' not found" when I'm uploading a file.

Cakephp show me than this the line generating this error

public function getFilesystem(string $field, array $settings = []): FilesystemInterface

  | {
  | $adapter = new Local(Hash::get($settings, 'filesystem.root', ROOT . DS));
  | $adapter = Hash::get($settings, 'filesystem.adapter', $adapter);
  | if (is_callable($adapter)) {
  | $adapter = $adapter();
  | }

Anyone knows what do I have to do to solve it?

As the plugin include this library in the composer file, I would guess that you've either not installed using Composer, or your autoload is broken somehow.

Try either re-installing with composer install, composer require josegonzalez/cakephp-upload or re-generating the autoload with composer dumpautoload

I really apreciate your help, reinstaling works. Thank you so much.