关于FCKeditor,上传文件时提示invalid request
2010-01-27 09:59 于为源 阅读(2070) 评论(0) 编辑 收藏 举报在使用FCKeditor的时候,里边有一个功能就是超链接中能选择文件上传,如图:
但是测试的时候发现这个功能一点“发送到服务器上”按钮,就会提示“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' ;
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
如果对您有帮助,您也可以请我喝杯可乐。