无法限制其他文件在 ElFinder 中上传


Not able to restrict other files from uploading in ElFinder

我正在为我的Elfinder使用此配置以与CKEditor一起使用。

$opts = array(
    // 'debug' => true,
    'roots' => array(
        array(
            'driver'        => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)
            'path'          => '../../uploads/',         // path to files (REQUIRED)
            'URL'           => dirname($_SERVER['PHP_SELF']) . '/../../uploads/', // URL to files (REQUIRED)
            'accessControl' => 'access'  ,           // disable and hide dot starting files (OPTIONAL)
            'uploadAllow' => array('image/jpg', 'image/png'),
            'alias'      => 'Home',
            'mimeDetect' => 'internal',
            'imgLib'     => 'gd',
        ),

    ),

);

但是,我可以上传所有文件,甚至是PHP文件!!我只想上传图片。我无法限制上传。我哪里出错了?

添加:

'uploadOrder'=> array( 'allow', 'deny' )

如果没有此功能,则默认策略是允许的,如果它们都不匹配。

根据:https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options#wiki-uploadOrder