How To Enable File Browsing for a Custom Protocol Handler

In order to allow users to insert images more easily, the WebApp Component provides a file browsing JavaScript widget that can be used for any custom protocol plugin. To enable this widget, follow these steps:
  1. Develop a plugin that implements the ro.sync.exml.plugin.urlstreamhandler.URLStreamHandlerPluginExtension interface. The getURLStreamHandler method should return an instance of the ro.sync.net.protocol.FileBrowsingConnection interface.
  2. On the client-side, register the sync.api.FileBrowsingDialog widget as a UrlChooser using the following code snippet:
    workspace.setUrlChooser(new sync.api.FileBrowsingDialog());