通过ckeditor上传不同的文件

时间:2013-11-26 08:05:26

标签: pdf ckeditor exe

我查了http://ckeditor.com/demo#full

但我找不到通过ckeditor上传.exe文件的任何选项。

我可以通过此编辑器上传.exe文件吗?如果是,我该怎么做?

请建议。

2 个答案:

答案 0 :(得分:7)

使用链接按钮,选择上传标签,选择您的文件,然后按发送到服务器按钮上传。如果上传失败,那么就会有服务器端过滤器,并且您无法上传带有这些扩展名的文件。

答案 1 :(得分:0)

在Asp.net 您可以在CKFinder文件夹中的config.ascx中添加扩展名。 我有与上面提到的相同的问题 我通过在此文件中添加文件扩展名解决了我的问题。 我在此文件中的代码是

DefaultResourceTypes =“”;

    ResourceType type;

    type = ResourceType.Add( "Files" );
    type.Url = BaseUrl + "files/";
    type.Dir = BaseDir == "" ? "" : BaseDir + "files/";
    type.MaxSize = 0;
    type.AllowedExtensions = new string[] { "7z", "aiff", "asf", "avi", "bmp", "csv", "doc", "docx", "fla", "flv", "gif", "gz", "gzip", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "ods", "odt", "pdf", "png", "ppt", "pptx", "pxd", "qt", "ram", "rar", "rm", "rmi", "rmvb", "rtf", "sdc", "sitd", "swf", "sxc", "sxw", "tar", "tgz", "tif", "tiff", "txt", "vsd", "wav", "wma", "wmv", "xls", "xlsx", "zip","inp","html" };
    type.DeniedExtensions = new string[] { };

    type = ResourceType.Add( "Images" );
    type.Url = BaseUrl + "images/";
    type.Dir = BaseDir == "" ? "" : BaseDir + "images/";
    type.MaxSize = 0;
    type.AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
    type.DeniedExtensions = new string[] { };

    type = ResourceType.Add( "Flash" );
    type.Url = BaseUrl + "flash/";
    type.Dir = BaseDir == "" ? "" : BaseDir + "flash/";
    type.MaxSize = 0;
    type.AllowedExtensions = new string[] { "swf", "flv", "mp4" , "mp3"};
    type.DeniedExtensions = new string[] { };

最好的运气......