Skip to content

Commit

Permalink
Revert "Revert "http Helper 文件上传 bug fix""
Browse files Browse the repository at this point in the history
This reverts commit 0930162.
  • Loading branch information
279328316 committed Aug 4, 2020
1 parent 35179cb commit 455884f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Jc.Core/Helper/HttpHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ public HttpWebResponse CreateUploadFileHttpResponse(string url, object requestPa

#region 上传数据 文件

if (requestParams!=null || fileList != null && fileList.Count > 0)
if (requestParams != null || (fileList != null && fileList.Count > 0))
{
using (Stream stream = request.GetRequestStream())
{
Expand Down Expand Up @@ -784,10 +784,10 @@ public HttpWebResponse CreateUploadFileHttpResponse(string url, object requestPa
stream.Write(buffur, 0, buffur.Length);
}
}
//结尾加上结束分隔符
byte[] endBoundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "--\r\n");
stream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);
}
//结尾加上结束分隔符
byte[] endBoundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "--\r\n");
stream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);
}
}
#endregion
Expand Down

0 comments on commit 455884f

Please sign in to comment.