Installing Document Manager of UI Complex Widgets, Document Manager Webix Docs
To start using Document Manager, you need to:
- Include the necessary JS and CSS scripts into an HTML file.
- Call the object constructor.
Included Files
You need to include 4 files on a page:
<html>
<head>
<!-- Webix Library -->
<script src="codebase/webix.js" type="text/javascript"></script>
<link rel="stylesheet" href="codebase/webix.css" type="text/css">
<!-- Document Manager -->
<script type="text/javascript" src="codebase/docmanager.js"></script>
<link rel="stylesheet" href="codebase/docmanager.css" type="text/css">
</head>
<body>
<!-- Document Manager constructor -->
<script> webix.ui({
view: "docmanager"
});
</script>
</body>
</html>
See the next chapter to learn more ways of creating Document Manager on a page.
Staring a Backend Server
Document Manager works with SQL Database named files by default. Make sure that you have a database to store data about files, directories, groups, tags, comments and users. We provide backend code for Document Manager for Golang.
Using Golang Backend
To get the Golang backend for Document Manager, clone the repo and start it locally as:
go build
# bash
./wfs-ls -data some/folder
# cmd
wfs-ls -data some/folder
some/folder is a relative path to a directory where added content will be stored.
Using File Preview Service
We also provide a backend service for generating file previews. Clone the repo and start it locally as:
go build
# bash
./preview
# cmd
preview
To use the preview service, start the Golang backend server with the preview parameter:
#bash
./wfs-ls -preview http://localhost:3201/preview -data some/folder
#cmd
wfs-ls -preview http://localhost:3201/preview -data some/folder
Running Package Samples Locally
To run package samples on a local machine you should navigate to the Document Manager root folder, install the necessary dependencies and start a development server as:
// navigate to the root folder
cd docmanager
// install dependencies
yarn install //or npm install
// start dev server
yarn server //or npm run server