Skip to content

qie.writeFTPFileNoEncryption

Signature: qie.writeFTPFileNoEncryption(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 (NO encryption).

try {
    qie.writeFTPFileNoEncryption(
    'sftp.example.com',                             // host
    21,                                             // port
    'theirs.txt',                                   // path: {path}/{filename.ext}
    false,                                          // binary
    true,                                           // passive
    '',                                             // ftp parameters
    'interfaceUser',                                // username
    'yourPassword',                                 // password
    'More data this time to go in theirs.txt file.' // data: byte[] | String | File
    );
} catch (error) {
    // Useful if the file already exists, or the endpoint rejects overwrites.
    qie.warn(error);
}