Manages FTP and SFTP connections opened by app scripts, enforcing a per-tenant limit on concurrent connections. Registered as the "ftpManager" service, so app developers reach it from server-side JS as ftpManager. Call openFtp or openSFtp to obtain a FtpSession for uploading, downloading or listing files on a remote server; sessions are tracked per tenant and force-closed by a background worker after a maximum duration if they are not closed explicitly.

Group: Managers


Properties

PropertyReturnsDescription
tenantConnectionCountint

Methods

openFtp(String address, String user, String pass, String security, boolean isImplicit)

Returns: FtpSession

Opens an FTP or FTPS connection to a remote server and logs in, throwing if the tenant already has the maximum number of concurrent connections open. The returned session is tracked for this tenant and will be force-closed after a maximum duration even if the caller never closes it.

ParameterDescription
addressthe server URL to connect to, for example ftp://111.222.111.222/Inbound
userthe user id to log in with
passthe password to log in with
securitythe encryption mode, either SSL, TLS or null for plain FTP
isImplicittrue to use implicit FTPS, false to use explicit FTPS; ignored for plain FTP

openSFtp(String address, String user, String pass, String privateKey)

Returns: FtpSession

Opens an SFTP connection to a remote server, authenticating with a private key if one is supplied or with a password otherwise, throwing if the tenant already has the maximum number of concurrent connections open. The returned session is tracked for this tenant and will be force-closed after a maximum duration even if the caller never closes it.

ParameterDescription
addressthe server URL to connect to
userthe user id to authenticate with
passthe password to authenticate with; ignored when privateKey is supplied
privateKeya PEM-encoded private key to authenticate with, or blank to authenticate with pass instead
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.