thedevelobear / filemanager

React based FileManager for browser ( + FS REST API for Node.js and Express)

Home Page:https://opuscapita-mk8s-cluster-1.westeurope.cloudapp.azure.com/filemanager/master/?currentComponentName=FileManager&maxContainerWidth=100%25&showSidebar=false

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filemanager

badge-circleci badge-npm badge-license

Sorry for missing 🌎 SSL cert at demo site. We'll fix it 🔜

Demo and react documentation are powered by React Showroom

Packages

Detailed documentation for each package is coming soon.

Basic usage

Client implementation is an npm package which can be embed into your application. It uses React framework and supports connectors to different file storages. Predefined connectors are:

You can write you own custom connectors (documentation on how to do it will appear later).

How to use Server Node

Server Node API v1 Documentation

Install package

npm install --save @opuscapita/filemanager-server

Now you have at least two ways of using it:

  • Start as application
let config = {
  fsRoot: __dirname,
  rootName: 'Root folder',
  port: process.env.PORT || '3020',
  host: process.env.HOST || 'localhost'
};

let filemanager = require('@opuscapita/filemanager-server');
filemanager.server.run(config);

How to use Client React

Install packages

npm install --save @opuscapita/react-filemanager @opuscapita/react-filemanager-connector-node-v1

Use it as a child component of you application

import React from 'react';
import ReactDOM from 'react-dom';
import { FileManager, FileNavigator } from '@opuscapita/react-filemanager';
import connectorNodeV1 from '@opuscapita/react-filemanager-connector-node-v1';

const apiOptions = {
  ...connectorNodeV1.apiOptions,
  apiRoot: `http://opuscapita-filemanager-demo-master.azurewebsites.net/` // Or you local Server Node V1 installation.
}

const fileManager = (
 <div style={{ height: '480px' }}>
    <FileManager>
      <FileNavigator
        id="filemanager-1"
        api={connectorNodeV1.api}
        apiOptions={apiOptions}
        capabilities={connectorNodeV1.capabilities}
        initialResourceId={'Lw'}
        listViewLayout={connectorNodeV1.listViewLayout}
        viewLayoutOptions={connectorNodeV1.viewLayoutOptions}
      />
    </FileManager>
  </div>
);

ReactDOM.render(fileManager, document.body);

Main contributors

Alexey Sergeev
Kirill Volkovich
Andrei Mourzenkov
Aleksandr Baliunov
Egor Stambakio

License

Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

About

React based FileManager for browser ( + FS REST API for Node.js and Express)

https://opuscapita-mk8s-cluster-1.westeurope.cloudapp.azure.com/filemanager/master/?currentComponentName=FileManager&maxContainerWidth=100%25&showSidebar=false

License:Apache License 2.0


Languages

Language:JavaScript 90.0%Language:CSS 6.5%Language:RAML 2.7%Language:Shell 0.4%Language:Smarty 0.2%Language:HTML 0.2%