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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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:

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 the esanj/auth-bridge authentication 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:

  1. Include the main script and the button adapter:

  2. 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-trigger to the button.
    • Use data-input to specify the selector of the input field.
    • Use data-preview to specify the selector of the preview image.
  3. 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.

  1. Define your callback function:

  2. Add the data-callback attribute 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

PHP Build Version
Package Version
Requires php Version ^8.1
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package esanj/file-browser contains the following files

Loading the files please wait ...