mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
fe5489eec8
# Connector configuration options ```php $opts = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', 'path' => '/path/to/files/', 'URL' => 'http://localhost/to/files/', 'plugin' => array( /* optional, this volume values are */ 'AutoResize' => array( 'enable' => true, // For control by volume driver 'maxWidth' => 1024, // Path to Water mark image 'maxHeight' => 1024, // Margin right pixel 'quality' => 95, // JPEG image save quality 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP // Target image formats ( bit-field ) ), ), ), 'bind' => array( /* regist action, require */ 'upload.presave' => array( 'Plugin.AutoResize.onUpLoadPreSave' ), ), 'plugin' => array( /* optional, All volume's default values are */ 'AutoResize' => array( 'enable' => true, // For control by volume driver 'maxWidth' => 1024, // Path to Water mark image 'maxHeight' => 1024, // Margin right pixel 'quality' => 95, // JPEG image save quality 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP // Target image formats ( bit-field ) ), ), ); $connector = new elFinderConnector(new xelFinder($opts), true); $connector->run(); ``` # Connector configuration options(enable AutoResize & Watermark with default) ```php $opts = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', 'path' => '/path/to/files/', 'URL' => 'http://localhost/to/files/', ), 'bind' => array( /* regist action, require */ 'upload.presave' => array( 'Plugin.AutoResize.onUpLoadPreSave', // Do 1st 'Plugin.Watermark.onUpLoadPreSave' // Do 2nd ), ), ); $connector = new elFinderConnector(new xelFinder($opts), true); $connector->run(); ```