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

报告相同问题?

悬赏问题

  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
  • ¥15 NAO机器人的录音程序保存问题
  • ¥15 C#读写EXCEL文件,不同编译