2017-03-02 127 views
2

在config.php文件中使用CkFinder V3可以设置不同的资源类型。在CkFinder的所有资源类型中创建子文件夹

设置工作,我在左侧面板上的两个“条目”名为“我的图像”和“我的视频”获取CkFinder。

现在,当我选择文件夹“我的视频”并创建一个子文件夹时,子文件夹将添加到“我的视频”和“我的图像”上。

我只需要在用户决定的地方添加一个子文件夹。

我的配置有什么问题?

$config['resourceTypes'][] = array(
    'name'    => 'Images', 
    'label'    => 'My Images', 
    'maxSize'   => '2M', 
    'allowedExtensions' => 'gif,jpeg,jpg,png', 
    'deniedExtensions' => '', 
    'backend'   => 'default' 
); 

$config['resourceTypes'][] = array(
    'name'    => 'Videos', 
    'label'    => 'My Videos', 
    'maxSize'   => '1G', 
    'allowedExtensions' => 'mp4', 
    'deniedExtensions' => '', 
    'backend'   => 'default' 
); 

回答

2

您已经定义指向同一个文件夹(default后端的根文件夹),因为它们不定义directory两种资源类型。要使用单独的文件夹,请使用directory选项,如下所示:

$config['resourceTypes'][] = array(
    'name'    => 'Images', 
    'label'    => 'My Images', 
    'maxSize'   => '2M', 
    'allowedExtensions' => 'gif,jpeg,jpg,png', 
    'deniedExtensions' => '', 
    'directory'   => 'images', // ← 
    'backend'   => 'default' 
); 

$config['resourceTypes'][] = array(
    'name'    => 'Videos', 
    'label'    => 'My Videos', 
    'maxSize'   => '1G', 
    'allowedExtensions' => 'mp4', 
    'deniedExtensions' => '', 
    'directory'   => 'videos', // ← 
    'backend'   => 'default' 
); 
相关问题