barryvdh / elfinder-flysystem-driver

elFinder driver for Flysystem
183 stars 41 forks source link

Remove cache, change util, bump to v3 #83

Closed barryvdh closed 2 years ago

jnoordsij commented 2 years ago

Thanks for looking into this! So far no immediate errors yet, but it's not quite working yet either for me:

I'm afraid I won't be able to look into it much further over the next 1-2 weeks, but maybe after that I'll have some spare time to try and help with testing and bugfixing.

promatik commented 2 years ago

Hi @jnoordsij! I would love to help with PR's for this update, but I'm unable to find any bugs 😅

I'm using;

I tested all elfinder features and everything worked as expected. How did you got that error on _subdirs method? Thanks 🙌

promatik commented 2 years ago

Update on my previous message

I was able to test the Flysystem Driver, and as @jnoordsij said nothing gets listed on ElFinder.

image

I'm able to create files and folders but it doesn't get in the view.

I found it very strange because apparently the issue is not in the Driver, the json response of the connector is apparently correct.

image

It includes the list with all files and folders, I compared this response with an older version of this and I couldn't find any difference.


To setup the Flysystem Driver I used this:

use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter;

[
    'driver' => 'Flysystem',
    'alias' => 'Uploads',
    'filesystem' => new Filesystem(new LocalFilesystemAdapter(public_path('uploads'))),
    'cache' => false,
],

Note that League\Flysystem now uses LocalFilesystemAdapter instead of LocalAdapter. It also has a prefixer by default, so the best approach I got was to setup the path directly in the filesystem.

promatik commented 2 years ago

Hi @barryvdh! I have a question for you regarding this issues, I found out that by not using elfinder-flysystem-driver, elFinder works with local files, if the developer sets nothing on roots, laravel-elfinder works just great;

image

My first question is; what's the usage of elfinder-flysystem-driver? And then; if laravel-elfinder works just great without elfinder-flysystem-driver, shouldn't the installation be optional?

barryvdh commented 2 years ago

Yes for local you don't need the flysystem driver. I'll make that optional.

barryvdh commented 2 years ago

I merged this as 0.4 for now (dev version) and created https://github.com/barryvdh/laravel-elfinder/tree/develop which support 9.x, which you can test with composer require barryvdh/laravel-elfinder:dev-develop --prefer-source

barryvdh commented 2 years ago

Follow-up on https://github.com/barryvdh/elfinder-flysystem-driver/pull/84 I've tested it on the local driver, not yet ftp/s3. But should be the same logic als all specific adapter code/plugins are removed.