2013-11-26 56 views

回答

7

使用鏈接按鈕,選擇上傳選項卡,選擇您的文件,按它發送到服務器按鈕上傳。如果上傳失敗,則會出現服務器端過濾器,並且無法使用這些擴展名上傳文件。

+0

它的工作原理完全一樣伊萬描述。 –

+1

我試過這個,但是我得到一個錯誤「無效的文件擴展名」 – user2346003

+0

比你不能上傳可執行文件,你想上傳一些漏洞嗎?如果你只需要上傳文件,將其壓縮成zip或7z格式。 –

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[] { }; 

最好的運氣它的工作...