Install PHP file manager for TinyMCE 5 and 4 using Composer
Install the package into your project
The most modern way is to add Flmngr file manager package into your PHP app using Composer and map some URL using its API.
To download and install
edsdk/flmngr-server-php package, use this console command:
composer require edsdk/flmngr-server-php
Let Flmngr to handle some URL
In your code that processes a request to some URL you will specify to N1ED later, add the following call:
use EdSDK\FlmngrServer\FlmngrServer; FlmngrServer::flmngrRequest( array( 'dirFiles' => '/var/www/files', 'dirCache' => '/var/www/files/cache', 'dirTmp' => '/var/www/files/tmp' ) );
It is recommended to use absolute paths for all directories to avoid mistakes.
Check also the access rights for all these directories: system user used for your application or website must have both read and write right to them. For example in Ubuntu this used is called
www-data, in other Linux distributions there can be other names for it i. e.
apache or some custom user.
dirFiles - the place where you store all the files and images which are browsed by Flmngr file manager. You can use your existing storage you had before N1ED installation and Flmngr file manager will work like a charm with it.
dirTmp directories can be located anywhere and do not need to be publicly accessed from the web at all. Just be sure they exist.