gpt4 book ai didi

javascript - 在 CkFinder 的所有资源类型中创建子文件夹

转载 作者:行者123 更新时间:2023-11-29 19:06:19 25 4
gpt4 key购买 nike

在文件 config.php 中使用 CkFinder V3 设置了不同的资源类型。

设置有效,我在左侧面板的 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'
);

最佳答案

您定义的两种资源类型都指向同一个文件夹(default 后端的根文件夹),因为它们没有定义目录。要使用单独的文件夹,请使用 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'
);

关于javascript - 在 CkFinder 的所有资源类型中创建子文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42552297/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com