Installing File Manager

In order to start using File Manager, you need to:

  1. Include the necessary JS and CSS scripts into an HTML file.
  2. 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">
 
  <!-- 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.

Starting a Backend Server

We provide backend code for File Manager for NodeJS and Golang.

Using NodeJS Backend

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!

Using Amazon S3 Backend

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

Using Golang Backend

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

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 some/folder
 
# cmd
wfs-ls -preview http://localhost:3201/preview some/folder

Please, note that the preview service works with the Golang backend only.

Running Package Samples Locally

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
If you have not checked yet, be sure to visit site of our main product Webix js frameworks and page of html5 file manager product.