This commit is contained in:
parent
ea46298b9e
commit
4816589c85
|
|
@ -503,6 +503,11 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
// 创建内存流存储请求内容
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
|
||||
|
||||
string header = $"--{boundary}\r\nContent-Disposition: form-data; name=\"extra instructions\"\r\n\r\n注意数据不要少列,不要串列\r\n";
|
||||
byte[] headerBytes = Encoding.UTF8.GetBytes (header);
|
||||
ms.Write(headerBytes, 0, headerBytes.Length);
|
||||
// 1. 写入表单字段头
|
||||
ms.Write(boundaryBytes, 0, boundaryBytes.Length);
|
||||
|
||||
|
|
@ -521,6 +526,8 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
byte[] endBoundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "--\r\n");
|
||||
ms.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);
|
||||
|
||||
|
||||
|
||||
// 5. 创建HTTP请求
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uploadUrl);
|
||||
request.Method = "POST";
|
||||
|
|
|
|||
Loading…
Reference in New Issue