FCKeditor控件中,图片不能上传的功能

    技术2022-05-11  37

    1、FCKeditor控件中,图片不能上传的功能:   <1>、修改文件上传路径:FCKeditor/editor/filemanager/connectors/aspx/config.ascx 文件下:         UserFilesPath = "~/UpFile/FCKeditor";            <2>、对应的在项目 UpFile/FCKeditor/文件夹下,新建三个文件夹: File Image Flash

       <3>、设置用户是否拥有上传的权限:用户登录成功后,再_Default.aspx文件中保存    //登录成功,设置该会员是否有操作 FCKeditor 图片上传的功能        if (_Customer.Competences.IsOwnedCompetences(Competences.Administrator))        {            Session["IsAuthorized"] = true;        }

       <4>、取Session值:        SFS_BQW/Components/FCKeditor/editor/filemanager/connectors/aspx/config.ascx 文件中取该Session值做判断;            private bool CheckAuthentication()        {            // WARNING : DO NOT simply return "true". By doing so, you are allowing            // "anyone" to upload and list the files in your server. You must implement            // some kind of session validation here. Even something very simple as...            //            //  return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );            //            // ... where Session[ "IsAuthorized" ] is set to "true" as soon as the            // user logs in your system.

                return (Session["IsAuthorized"] != null && (bool)Session["IsAuthorized"] == true);   //获取Sesssion值               }       


    最新回复(0)