如何在KCFinder中更改图像的默认浏览目录? [英] How to change the default browse directory for images in KCFinder?

查看:47
本文介绍了如何在KCFinder中更改图像的默认浏览目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将CKEditor与KCFinder一起使用.除了一件事情,一切都很好.

I'm using CKEditor with KCFinder. Everything works great except one thing.

我的默认上传URL是:

My default upload URL is:

'uploadURL' => "/userfiles"

假设我要上传图片.我在CKEditor中单击上载图像",然后单击浏览服务器"以选择一个已经上载的图像.问题是CKEditor正在浏览/userfiles/images 而不是像我想要的那样仅/userfiles .

Let's say I want to upload an image. I click on Upload image in CKEditor, then I click on Browse the Server to select one already uploaded. Problem is that CKEditor is browsing /userfiles/images instead of just /userfiles like I would like to.

我了解这不是错误,而只是它的设置方式,但是我该如何更改?

I understand that this is not a bug and just a way it was set up but how do I change it?

我在 http://kcfinder.sunhater.com 上找不到任何内容

I didn't find anything on http://kcfinder.sunhater.com

推荐答案

我发现了一个更好的解决方法.

I found an even better workaround.

当在您的config.php文件中定义以下内容时,魔术就会发生:

The magic occurs when, in your config.php file, you define:

'types' => array(
        // CKEditor & FCKEditor types
        'files'   =>  "disabled",
        'flash'   =>  "disabled",
        'images'  =>  "*img",

        // TinyMCE types
        'file'    =>  "disabled",
        'media'   =>  "disabled",
        'image'   =>  "*img",
    ),

这表示KCfinder将创建一个图像"目录并存储图像.我禁用了文件"目录,因为我不允许用户上传文件.

This says that KCfinder will create an "images" directory and store images. I have a "files" directory disabled, since I don't allow my users to upload files.

如果要在根目录下执行的操作是添加一个''条目(空白),并指定可以上传的内容.在我的服务器上,我有:

What you do if you want them at the root directory is add a '' entry (blank), and assign what they can upload. In my server I have:

'types' => array(
        '' => "*img",
        // CKEditor & FCKEditor types
        'files'   =>  "disabled",
        'flash'   =>  "disabled"
    ),

这允许我直接将图像文件上传到根文件夹.

Which lets me upload image files directly to the root folder.

这篇关于如何在KCFinder中更改图像的默认浏览目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆