Fck Editor上传图片

时间:2009-08-17 11:50:23

标签: c# image upload fckeditor

我在FCK编辑器中遇到图像问题。当我尝试上传图像时,它会给我连接器禁用错误,并且图像不会显示在编辑器页面中。我正在使用visual studio 2008编程。请帮助

1 个答案:

答案 0 :(得分:2)

查看以下代码:

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.
        MembershipUser m = Membership.GetUser();
        if (m != null)
        {
            return true;
        } else {
            return false;
        }
        //return false;
    }

然后更新App和Root文件。