Download the PHP package esanj/file-browser without Composer
On this page you can find all versions of the php package esanj/file-browser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download esanj/file-browser
More information about esanj/file-browser
Files in esanj/file-browser
Package file-browser
Short Description A Laravel package for iframe-based file management
License MIT
Informations about the package file-browser
Esanj File Browser
This is a package that connects to the Esanj Multi-Media system after installation, allowing users to select files and add them to the editor. It functions as a file browser, similar to a file manager.
Support
This package supports:
- PHP 8.1+
- Laravel 10.x
- Laravel 11.x
- Laravel 12.x
- Laravel 13.x
Installation
Via Composer (VCS Repository)
Add the repository to your composer.json file:
Then run the following command to install the package (using master branch):
Post-Installation
After installing the package, publish the assets and configuration:
Security Configuration
After publishing the configuration file, it is highly recommended to edit config/esanj/file-browser.php and customize the middleware setting.
Please ensure you add appropriate middleware (e.g., web, auth, or a custom admin middleware) to restrict access to the file browser, preventing unauthorized users from accessing or managing files.
Environment Configuration
After installation, please add the following variables to your .env file:
Note: The
ACCOUNTING_BRIDGE_*variables are required for theesanj/auth-bridgeauthentication package.
Usage
This package supports multiple editors (Summernote, TinyMCE, CKEditor) and a standalone button mode.
Standalone Button
To use the file browser with a simple button (e.g., for a featured image), follow these steps:
-
Include the main script and the button adapter:
-
Add the HTML markup. You need an input field for the value, an optional image tag for preview, and the button itself.
- Add the class
fb-triggerto the button. - Use
data-inputto specify the selector of the input field. - Use
data-previewto specify the selector of the preview image.
- Add the class
- Initialize the button adapter:
Using a Custom Callback
You can also specify a custom JavaScript function to handle the selected files using the data-callback attribute.
-
Define your callback function:
- Add the
data-callbackattribute to your button:
TinyMCE Integration
First, include the adapter script after the main file browser script:
TinyMCE 5, 6, 7, 8
For modern versions of TinyMCE, use the file_picker_callback option.
TinyMCE 4
For older versions (v4), use file_browser_callback.
CKEditor Integration
First, include the adapter script after the main file browser script:
CKEditor 4
For CKEditor 4, use the initV4 method after replacing your textarea.
CKEditor 5
For CKEditor 5, add the adapter plugin to your editor configuration.
Summernote Integration
First, include the adapter script after the main file browser script:
Then, configure Summernote to include the custom button in the toolbar and register it in the buttons option.
License
The MIT License (MIT). Please see License File for more information.
All versions of file-browser with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
esanj/auth-bridge Version >=0.2.0 <0.3.0