qie.writeFTPFileImplicitTLS¶
Signature: qie.writeFTPFileImplicitTLS(host, port, path, binary, passive, ftpParameters, userName, password, data)
Returns: void
Writes the data to an FTP endpoint.
Note
QIE uses version 4.22.0 of Apache Camel. (See this article for available parameters).
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| String | host | hostname or ip address for the ftp server | |
| Integer | port | the port number to use | |
| String | path | {path}/{filename.extension} to write the file to. Use ".{no-extension}" to write to a file without an extension. | |
| Boolean | binary | transfer data using binary protocol | |
| Boolean | passive | use passive transfer mode (usually true) | |
| String | ftpParameters | additional custom camel ftp parameters to be used by this connection. (Format: {key}={value}\n{key2}={value2}...) | |
| String | userName | username to use for this connection | |
| String | password | password to use for this connection | |
| byte[], String, File | data | data to be written to ftp endpoint |
Example¶
// Example: write a file to an FTP endpoint using Implicit TLS.
try {
qie.writeFTPFileImplicitTLS(
'sftp.example.com', // host
990, // port (FTP Implicit TLS default)
'bob.txt', // path: {path}/{filename.ext}
false, // binary
true, // passive
'', // ftp parameters
'interfaceUser', // username
'yourPassword', // password
'More data this time to go in bob.txt file.' // data: byte[] | String | File
);
} catch (error) {
// Useful if the file already exists, or the endpoint rejects overwrites.
qie.warn(error);
}