예제 #1
0
        public override QQHttpRequest OnBuildRequest()
        {
            QQSession session = Context.Session;

            QQHttpRequest req = CreateHttpRequest("POST", QQConstants.URL_UPLOAD_CUSTOM_FACE);

            req.AddGetValue("time", DateUtils.NowTimestamp() / 1000 + "");
            req.AddPostValue("from", "control");
            req.AddPostValue("f", "EQQ.Model.ChatMsg.callbackSendPicGroup");
            req.AddPostValue("vfwebqq", session.Vfwebqq);
            req.AddPostValue("fileid", Context.Store.GetPicItemListSize() + "");
            req.AddPostFile("custom_face", file);

            return(req);
        }
        public override QQHttpRequest OnBuildRequest()
        {
            IHttpService httpService = Context.GetSerivce <IHttpService>(QQServiceType.HTTP);
            QQSession    session     = Context.Session;

            QQHttpRequest req = CreateHttpRequest("POST", QQConstants.URL_UPLOAD_OFFLINE_PICTURE);

            req.AddGetValue("time", DateUtils.NowTimestamp() / 1000 + "");
            req.AddPostFile("file", this.file);
            req.AddPostValue("callback", "parent.EQQ.Model.ChatMsg.callbackSendPic");
            req.AddPostValue("locallangid", "2052");
            req.AddPostValue("clientversion", "1409");
            req.AddPostValue("uin", Context.Account.Uin + ""); // 自己的账号
            req.AddPostValue("skey", httpService.GetCookie("skey", QQConstants.URL_UPLOAD_OFFLINE_PICTURE).Value);
            req.AddPostValue("appid", "1002101");
            req.AddPostValue("peeruin", user.Uin + ""); // 图片对方UIN
            req.AddPostValue("fileid", "1");
            req.AddPostValue("vfwebqq", session.Vfwebqq);
            req.AddPostValue("senderviplevel", Context.Account.Level.Level + "");
            req.AddPostValue("reciverviplevel", user.Level.Level + "");
            return(req);
        }