In order to start using File Manager, you need to:
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">
<!-- File Manager -->
<script type="text/javascript" src="codebase/filemanager.js"></script>
<link rel="stylesheet" href="codebase/filemanager.css" type="text/css">
</head>
<body>
<!-- File Manager constructor -->
<script> webix.ui({
view:"filemanager", url:"remote/data"
});
</script>
</body>
</html>
See the next chapter to learn more ways of creating File Manager on a page.
We provide backend code for File Manager for NodeJS and Golang.
To get the NodeJS backend for File Manager, clone the repo and start it locally as:
npm install
# windows, bash and cmd, same command
npm run local D:\\apps\\some
# linux
npm run local /media/usr/d/apps/some
Please, note that the absolute path to the file system is required!
To get the Amazon S3 backend for File Manager, clone the repo and start it locally as:
npm install
npm run local s3://bucket-name/
The credentials will be taken from next environment variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
To get the Golang backend for File Manager, clone the repo and start it locally as:
go build
# bash
./wfs-ls some/folder
# cmd
wfs-ls some/folder
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 some/folder
# cmd
wfs-ls -preview http://localhost:3201/preview some/folder
Please, note that the preview service works with the Golang backend only.
To run package samples on a local machine you should navigate to the File Manager root folder, install the necessary dependencies and start a development server as:
// navigate to root folder
cd files
// install dependencies
yarn install //or npm install
// start dev server
yarn server //or npm run server
Back to top