Пример #1
0
        public string UpFile(string aid, string filepath)
        {
            var param = GetParamDict(null);

            param.Add("aid", aid);
            param.Add("from", "file");
            SignParam(param);
            param.Add("file", new FileInfo(filepath));
            return(AjaxUtility.MultipartFormDataPost(ApiUrlUp, param));
        }
Пример #2
0
        public string UpUrl(string aid, string fileurl)
        {
            var param = GetParamDict(null);

            param.Add("aid", aid);
            param.Add("from", "web");
            SignParam(param);
            param.Add("fileurl", fileurl);
            return(AjaxUtility.Post(ApiUrlUp, param));
        }
Пример #3
0
 private string RestGetWithOpenKey(string action, Dictionary <string, object> parameters = null)
 {
     if (parameters == null)
     {
         parameters = new Dictionary <string, object>();
     }
     if (string.IsNullOrEmpty(OpenKey))
     {
         throw new NullReferenceException("OpenKey is required!");
     }
     parameters.Add("key", OpenKey);
     return(AjaxUtility.Get(ApiUrlGet, action, parameters));
 }