Laravel flysystem ftpd 适配器
Laravel flysystem ftpd adapter
我想使用 Laravel 中的 ftpd 适配器访问 Synology NAS,它似乎需要这个特定的适配器 https://github.com/thephpleague/flysystem/issues/305,但我收到错误消息
Driver [Ftpd] is not supported.
文件在那里:
vendor/league/flysystem/src/Adapter/Ftpd.php
我是否必须注册才能使用它?
我试过像这样在filesystems.php中使用它
'diskstation' => [
'driver' => 'Ftpd',
'host' => 'ftp.domain.com',
'username' => '****',
'password' => '****',
// Optional FTP Settings...
'port' => 21,
'root' => '',
'passive' => true,
'ssl' => false,
'timeout' => 10,
],
看起来 laravel 不支持开箱即用的 ftpd,您可以在此处看到:
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Filesystem/FilesystemManager.php#L13
它导入了一些 Flysystem 驱动程序,但没有导入 ftpd 驱动程序。
但是您可以创建自定义驱动程序,如图所示 here in the docs。 ftpd 驱动程序已经为 flysystem 构建,因此您只需通过此方法将其导入 laravel。
我想使用 Laravel 中的 ftpd 适配器访问 Synology NAS,它似乎需要这个特定的适配器 https://github.com/thephpleague/flysystem/issues/305,但我收到错误消息
Driver [Ftpd] is not supported.
文件在那里:
vendor/league/flysystem/src/Adapter/Ftpd.php
我是否必须注册才能使用它?
我试过像这样在filesystems.php中使用它
'diskstation' => [
'driver' => 'Ftpd',
'host' => 'ftp.domain.com',
'username' => '****',
'password' => '****',
// Optional FTP Settings...
'port' => 21,
'root' => '',
'passive' => true,
'ssl' => false,
'timeout' => 10,
],
看起来 laravel 不支持开箱即用的 ftpd,您可以在此处看到:
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Filesystem/FilesystemManager.php#L13
它导入了一些 Flysystem 驱动程序,但没有导入 ftpd 驱动程序。
但是您可以创建自定义驱动程序,如图所示 here in the docs。 ftpd 驱动程序已经为 flysystem 构建,因此您只需通过此方法将其导入 laravel。