/// <summary> /// 上传客服头像 /// </summary> /// <param name="access_token">公众号access token</param> /// <param name="kf_account">完整客服帐号,格式为:帐号前缀@公众号微信号</param> /// <param name="filepath">头像物理路径</param> /// <param name="timeout">超时时间</param> /// <returns></returns> public JsonResult UploadKFHeaderImg(string access_token, string kf_account, string filepath, int timeout = 1200000) { string url = $"{Config.WxApi}customservice/kfaccount/uploadheadimg?access_token={access_token}&kf_account={kf_account}"; Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("media", filepath); MaterialService service = new MaterialService(); JsonResult result = service.AddFileToWeChat <JsonResult>(url, dic, timeout); return(result); }