【问题标题】:Image upload issue by ckeditorckeditor的图片上传问题
【发布时间】:2014-04-08 12:12:23
【问题描述】:

我已经设置了一个 ckeditor + kcfinder 来让用户上传图片。

据我所知,浏览器安全机制不允许服务器知道客户端文件路径。

但是发生了一个奇怪的问题。数据库显示有一条记录:

"<img src="file:///C:/Users/ASUSUS~1/AppData/Local/Temp/xxxx.jpg">"

正常的代码会喜欢

"<img alt="" src="/mydomain/ckeditor/kcfinder/upload/images/xxxx.jpg"">

当其他用户读取此数据时,导致我的网站失败。

有人可以提示我为什么会显示客户端的文件路径吗?

谢谢。

【问题讨论】:

  • 我发现问题是由于用户直接从 MS WORD 中通过图像引起的。有人知道如何禁用该功能吗?

标签: ckeditor kcfinder


【解决方案1】:

您是否编辑了 kcfinder 的 config.php 文件?像这样:

'uploadURL' => "http://www.yourdomain.com/ckeditor/kcfinder/upload/images",
'uploadDir' => "your_directory_path/images", // This is absolute path
'dirPerms' => 0755,
'filePerms' => 0644,

【讨论】:

    猜你喜欢
    • 2010-11-30
    • 1970-01-01
    • 2019-07-16
    • 2020-06-07
    • 2013-06-05
    • 2011-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多