CompleteFTP is highly customizable allowing users to extend its inbuilt functionality using JSS, as well as .NET assemblies, batch scripts, Powershell scripts and executables.
JSS (Javascript Server-Side) is the name given to CompleteFTP's scripting environment. It includes a Javascript language interpreter and an API for integrating with CompleteFTP as well as performing common tasks.
JSS may be used to implement:
Process triggers that are executed when one or more specified events occur within CompleteFTP, such as a user logging in, a client uploading a file or a scheduled timer ticking over.
IP filter extensions facilitate the addition of custom rules for blocking connections from specified IP addresses (e.g. IP addresses from particular countries).
Authentication extensions allowing CompleteFTP to authenticate via a source other than those that are already built-in (i.e. internal users, Windows users, databases and remote FTP/SFTP servers).
File-system extensions which implement custom file systems that may, for example, store files in storage other than file-systems, e.g. databases.
Custom-command extensions contain user-defined functions that may be invoked by clients via FTP (via the SITE command), SFTP (via SSH_FXP_EXTENDED), SSH (as terminal commands) and HTTP/S (via GET or POST).
Web applications that may be accessed by regular users just like any other web application. EnterpriseDT's own customer portal, edtConnect, is a JSS web-app that's hosted on CompleteFTP. It accepts electronic payments and manages licenses for many thousands of users
The JSS API is the set of functions, services and classes available for integrating with CompleteFTP and for performing common operations, such as HTTP requests, sending e-mails and access databases.
JSS API services in CompleteFTP are global objects containing properties and functions.
Their names start with a lower-case letter, e.g. console, http, mail. Since they
are global objects, they may be used without first instantiating an object. For
example, the statement, console.log("Hello")
, logs a message to the CompleteFTP
logs. The services are listed in the left side-bar.
JSS API classes provide features such as FTP/SFTP clients, virtual file-system access
and database access. The names of JSS API classes begin with an upper-case letter.
The classes are listed in the left side-bar.
The JSS API provides two global functions: include and publish. These allow the developer to reuse code between script files and control which functions are exposed via RPC.
JSS offers two methods of integrating with .NET:
new System.Text.StringBuilder()
will instantiate the .NET class, StringBuilder
.
This objects properties and methods may be accessed in the same way as those
of native Javascript objects. The names of classes must be fully qualified. This
usage is disallowed in web apps for security reasons.
MyNamespace.MyClass
containing a method called MyMethod
is registered
in CompleteFTP Manager with the name myStuff
,
then the method may be called from JSS using the expression myStuff.MyMethod()
.
The location of the assembly containing this class is specified upon registration.
JSS's Javascript interpreter is compliant with ECMAScript 3 (ES3), but includes some ES5 features such as inbuilt JSON support, and extra methods on Array, Date and String objects.