From 6626449abafb47c603f4fe02f6072d026f145b3a Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Mon, 19 Feb 2024 16:59:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-143459=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=A4=B4boundary=E4=B8=8EformData=E4=B8=ADWe?= =?UTF-8?q?bKitFormBoundary=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/single/input/file.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/fineui/src/base/single/input/file.js b/packages/fineui/src/base/single/input/file.js index c89a02e70..b89be838f 100644 --- a/packages/fineui/src/base/single/input/file.js +++ b/packages/fineui/src/base/single/input/file.js @@ -243,13 +243,10 @@ const sendFile = (toString => { } } const boundary = `AjaxUploadBoundary${new Date().getTime()}`; - xhr.setRequestHeader("Content-Type", `multipart/form-data; boundary=${boundary}`); if (handler.file.getAsBinary) { + xhr.setRequestHeader("Content-Type", `multipart/form-data; boundary=${boundary}`); xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file)); } else { - xhr.setRequestHeader("Content-Type", "multipart/form-data"); - // xhr.setRequestHeader("X-Name", handler.name); - // xhr.setRequestHeader("X-File-Name", handler.file.fileName); const form = new FormData(); form.append("FileData", handler.file); xhr.send(form); From 86d33217d74998010f088ee058c5e0cb49518cbf Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Tue, 20 Feb 2024 13:58:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-143459=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=A4=B4boundary=E4=B8=8EformData=E4=B8=ADWe?= =?UTF-8?q?bKitFormBoundary=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/single/input/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/base/single/input/file.js b/packages/fineui/src/base/single/input/file.js index b89be838f..63278b6e0 100644 --- a/packages/fineui/src/base/single/input/file.js +++ b/packages/fineui/src/base/single/input/file.js @@ -242,8 +242,8 @@ const sendFile = (toString => { upload.onloadstart(); } } - const boundary = `AjaxUploadBoundary${new Date().getTime()}`; if (handler.file.getAsBinary) { + const boundary = `AjaxUploadBoundary${new Date().getTime()}`; xhr.setRequestHeader("Content-Type", `multipart/form-data; boundary=${boundary}`); xhr[xhr.sendAsBinary ? "sendAsBinary" : "send"](multipart(boundary, handler.name, handler.file)); } else {