getService

returns a service available for Document Manager

object getService(string service);
servicestringthe service name
objectthe object with the service methods

Example

const local = $$("dm").getService("local"); 
  local.updateFile(data.id, {
    size: data.size, date: data.date
  });

Related samples

Details

Services are major blocks of inner logic of the widget. Their methods can be called directly as well as customized.

Document Manager has access to the following services:

  • "local" - works with the client data (file system data);
  • "localusers" - stores all user data locally;
  • "localtags" - stores all tags locally;
  • "operations" - synchronizes the backend data with the client data;
  • "backend" - file system data;
  • "tags" - stores tag-related data;
  • "users" - stores user-related data;
  • "versions" - works with edit history of text (type "code") and Excel files.
See also
Back to top