barryvdh / elfinder-flysystem-driver

elFinder driver for Flysystem
183 stars 41 forks source link

in function _stat(), $stat['name'] is never set - remnants from older flysystem api? #95

Open dekeonus opened 5 months ago

dekeonus commented 5 months ago

in _stat() meta['filename'] is never set and $meta['extension'] is set to null (both in the check for existence in attributeCache and when constructing meta from the this->fs object).

https://github.com/barryvdh/elfinder-flysystem-driver/blob/91267e18bb6827cd563c82345286a74e7a509ca5/src/Driver.php#L268-L274

Background: I was looking for a quick "temporary" fix for webdav where most of my client software set "Content-Type:" to application/octet-stream or didn't set it at all and that is the webdav server's default. So I was intending to use the flysystem mime-type-detection package to override the anything returned as application/octet-stream

On the note of older code the import (use) block at the beginning of the file seems to have some invalid (for flysystem^3) entries: https://github.com/barryvdh/elfinder-flysystem-driver/blob/91267e18bb6827cd563c82345286a74e7a509ca5/src/Driver.php#L8-L9 my understanding is that flysystem-cached-adapter is flysystem-1.x only

and https://github.com/barryvdh/elfinder-flysystem-driver/blob/91267e18bb6827cd563c82345286a74e7a509ca5/src/Driver.php#L21 went away in flysystem-2