Browse Source

BI-143459 fix: 修复请求头boundary与formData中WebKitFormBoundary不一致问题

research/test
Austin.Duan 10 months ago
parent
commit
86d33217d7
  1. 2
      packages/fineui/src/base/single/input/file.js

2
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 {

Loading…
Cancel
Save