标签:
byte[] buffer = Convert.FromBase64String(param.Base64Code); System.Net.WebClient webClient = new System.Net.WebClient(); param.MsysGuid = Utils.NewGUID; param.FileName = String.Format("{0}.jpg", param.OrderMumber); string webHostUrl = string.Format("http://{0}/Upload.aspx?&fid={1}&fname={2}&fsize={3}&guid={4}", Utils.FileServerIp, param.MsysGuid, Uri.EscapeDataString(param.FileName), buffer.Length, param.MsysGuid); byte[] bytes = webClient.UploadData(webHostUrl, buffer); string result = webClient.Encoding.GetString(bytes); webClient.Dispose(); if (result.StartsWith("##")) { throw new Exception(result); }
标签:
原文地址:http://www.cnblogs.com/sunxuchu/p/5416898.html