From 6626449abafb47c603f4fe02f6072d026f145b3a Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Mon, 19 Feb 2024 16:59:36 +0800 Subject: [PATCH] =?UTF-8?q?BI-143459=20fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=B4boundary=E4=B8=8EformData=E4=B8=ADWebKitFormB?= =?UTF-8?q?oundary=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);