fsi-open / files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FTP

pawloaka opened this issue · comments

Hi,
is it possible to upload, download, check if exists a file on the FTP server with your bundle?
If yes, how? May you upload the config file that will show how to connect to ftp server?

I have tried something like this:

oneup_flysystem:
    adapters:
        ftp_adapter:
            ftp:
                host: 'ftp.example.com'
                username: 'username'
                password: 'password'
                port: 21
                root: '/path/to/root'
                passive: true
                ssl: true
                timeout: 30
    filesystems:
        ftp_filesystem:
            adapter: ftp_adapter
            mount: ftp_filesystem


fsi_files:
    url_adapters:
        ftp: 'fsi_files.url_adapter.ftp'
    entities:
        App\User:
            filesystem: 'ftp_filesystem'
            prefix: user
            fields:
                - { name: photo }

#services.yaml
...
  fsi_files.url_adapter.ftp:
    class: FSi\Component\Files\UrlAdapter\BaseUrlAdapter
    arguments:
      $uriFactory: '@Psr\Http\Message\UriFactoryInterface'
      $baseUrl: 'What's here?'