Protocol Application Presence Detection

DocManager functions for document opening provide a callback parameter to be executed if no required protocol is installed on a client machine. This callback is executed for non-MS Office documents only if the protocol application is not installed. In this callback, you will typically request a protocol application installation and will redirect to the installer download, depending on the client's OS.

As soon as every OS requires its own installer, the IT Hit WebDAV Ajax Client library provides DocManager.GetProtocolInstallFileNames() function that returns an array of installer filenames depending on the OS on which the client code is executed. The WebDAV Ajax Library is provided with protocol applications for Windows, MacOS and Linux, that are located in the /Plugins/ folder in the archive. Note that on Linux OS, more than one installer is available and this function always returns an array of installer file names.

Below is a typical callback implementation: 

ITHit.WebDAV.Client.DocManager.EditDocument("https://server/folder/file.ext", "/", protocolInstallCallback);
            
// Called if protocol handler is not installed
function protocolInstallCallback(message) {
      var installerFilePath = "/Plugins/" + ITHit.WebDAV.Client.DocManager.GetProtocolInstallFileNames()[0];
            
      if (confirm("This action requires a protocol installation. Select OK to download the protocol installer.")){
           window.open(installerFilePath);
      }
}

Next Article:

Protocol Application Installation on Windows