关于FCKeditor,上传文件时提示invalid request

在使用FCKeditor的时候,里边有一个功能就是超链接中能选择文件上传,如图:

image

但是测试的时候发现这个功能一点“发送到服务器上”按钮,就会提示“invalid request”。最后从官方的一个帖子里得到了解决方法,感谢一下该贴作者。

 

I had this problem as well. The problem is that it can't find the type of resource for upload. I assume that it should detect the resource type by file extension, but there is no code to do that.

I fixed it by adding the resource type "File" in the config. I think this is a workaround, but it worked for me.

So the link browser url looks somewhat like this (added Type=File&):
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=File
&Connector =http://www.cnblogs.com/http://www.cnblogs.com/connector.' + _FileBrowserExtension;

And the quick upload looks like this (added + '?Type=File' ):
FCKConfig.LinkUploadURL = FCKConfig.BasePath + '../upload.' + _QuickUploadExtension + '?Type=File' ;

 

也就是,在配置文件中(fckconfig.js)中将FCKConfig.LinkUploadURL 属性改为FCKConfig.BasePath + '../upload.' + _QuickUploadExtension + '?Type=File' ;
即可。

转载于:https://www.cnblogs.com/yuanyuan/archive/2010/01/27/1657246.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值