Base64编码保存到文件服务器
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?&id={1}&fileName={2}&bufferSize={3}",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); }