Browse Source

Merge pull request #264651 in DEC/fineui from release/11.0 to bugfix/11.0

* commit '9d5e6f0c5a3de55e81736bac9f4d01340e21f205':
  BI-143459 fix: 修复请求头boundary与formData中WebKitFormBoundary不一致问题
  BI-143696 fix: 对象.**容错
  BI-143459 fix: 修复请求头boundary与formData中WebKitFormBoundary不一致问题
research/test
superman 10 months ago
parent
commit
ae8f5a80bb
  1. 7
      packages/fineui/src/base/single/input/file.js
  2. 2
      packages/fineui/src/fix/fix.js

7
packages/fineui/src/base/single/input/file.js

@ -242,14 +242,11 @@ const sendFile = (toString => {
upload.onloadstart();
}
}
const boundary = `AjaxUploadBoundary${new Date().getTime()}`;
xhr.setRequestHeader("Content-Type", `multipart/form-data; boundary=${boundary}`);
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 {
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);

2
packages/fineui/src/fix/fix.js

@ -929,7 +929,7 @@ function watch(model, expOrFn, cb, options) {
return m;
} : parsePath(exp);
const v = getter.call(model, model);
if (v.__ob__) {
if (v && v.__ob__) {
const dep = new Dep();
if (isGlobal) {
(v.__ob__._scopeDeps || (v.__ob__._scopeDeps = [])).push(dep);

Loading…
Cancel
Save