Install NodeJS file manager for TinyMCE
Server side of Flmngr file manager for Node.js is a package ready to use in Express bases apps.
This package provides Node backend support for Flmngr as TypeScript/JavaScript library.
With npm installed, run:
$ npm install @edsdk/flmngr-server
Yarn users can run:
$ yarn add @edsdk/flmngr-server
Map some URL of your Express app
Bind the required URL in your application in this way:
import express from 'express';
import bindFlmngr from '@edsdk/flmngr-server';
const app = express();
bindFlmngr({
app: app, // your Express application
url: '/flmngr', // URL to handle (this will be "File Manager URL for dashboard)
dir: '/var/www/files', // where files are stored into (this path converted to URL will be "Files URL" for dashboard)
config: {} // optional config
);
If you want to allow access to uploaded files (usually you do) then write something like:
app.use(express.static('/var/www/files'));