FTP, File Transfer Protocol, is a protocol used to transfer files from a computer to a server or from a server to a computer.
What is it ?
The SFTP plugin aims at integrating the files uploader into the Pipeline stack.
This plugin is already integrated into the Satellite package, so you can’t require it with the composer.
Unlike the other plugins, the FTP plugin can only be used to load data.
Building a loader
To build a loader, you need to define a list of servers to which files will be sent and choose which files will be sent.
Configuring your servers
Each server must have a
port (optional, use port 21 by default), the
password to connect to the
server and the
base_path of the server where the files will be sent.
sftp: loader: servers: - host: 'http://localhost' port: 21 username: 'root' password: 'root' base_path: /
It’s possible to activate the passive mode when connecting to a server with the
sftp: loader: servers: - # ... passif_mode: true
Configuring your files
Next, you need to determine the specific path of each file you are going to upload and its content.
sftp: loader: put: - path: my/file/path content: 'my_content'
It’s possible to upload only those files that meet a condition using the
sftp: loader: put: - # ... if: '@=input["image"] !== null'
sftp: loader: servers: - host: 'http://localhost' port: 21 username: 'root' password: 'root' base_path: / put: - path: my/file/path content: 'my_content'