Example #1
0
        public void ProcessRequest(HttpContext context)
        {
            #region 检查是否登录
            currentUserInfo = bllWebsiteDomainInfo.GetCurrentUserInfo();
            if (currentUserInfo == null)
            {
                resp.IsSuccess = false;
                resp.Msg       = "您还未登录";
                context.Response.Write(Common.JSONHelper.ObjectToJson(resp));
                return;
            }
            #endregion

            try
            {
                OssHelper.SetBucketAcl(context.Request["bucketName"], context.Request["aclType"]);
            }
            catch (Exception ex)
            {
                resp.Msg = ex.Message;
                context.Response.Write(Common.JSONHelper.ObjectToJson(resp));
                return;
            }

            //返回字符串
            resp.IsSuccess = true;
            resp.Msg       = "设置Bucket的Acl完成";
            context.Response.Write(Common.JSONHelper.ObjectToJson(resp));
        }