JSS-to-.NET bridge extensions may be used to call into .NET from JSS, thus offering wide extensibility to the JSS platform. It might be used, for example, to wrap a simple .NET function, so that it may be used in JSS or as a bridge between JSS and a .NET API for a web-service.
General instructions on building CompleteFTP extensions may be found here.
Once a JSS-to-.NET Bridge has been added the methods it contains may be called using the following pattern:
Add the extension as type ‘JSS-to-.NET Bridge’ in the Extensions panel in the Manager. Make sure that the name you use, only has letters and no spaces, .e.g‘HashFunctions'.
Once you’ve added the extension, you can use the class in a JSS upload process trigger like the following:
var ftp = new Ftp("Servername", "Username", "Password"); ftp.connect(); ftp.upload(event.virtualPath, event.fileName); ftp.close(); console.log(HashFunctions.calculateMD5(event.virtualPath));
This should write the MD5 hash of the file-name to the log, each time a file is uploaded.