dongliuzhuan1219 2017-03-02 10:03
浏览 177
已采纳

子文件夹在CkFinder中的所有resourceTypes中创建

Using CkFinder V3 in file config.php have setup different resourceTypes.

The settings works and I get in CkFinder on the left panel two "entries" called "My Images" and "My Videos".

Now when I select folder "My Videos" and create a sub folder, the sub folder is being added on "My Videos" and also on "My Images".

I need to add a sub folder only in the place where user decided too.

What is wrong in my configurations?

$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'
);
  • 写回答

1条回答 默认 最新

  • dongtuo5262 2017-03-02 12:38
    关注

    Both resource types you have defined point to the same folder (the root folder of the default backend), because they do not define a directory. To use separate folders please use the directory option, like presented below:

    $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'
    );
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!