From 0e6d86c45310d907a97bb5825b31fe73f9fd5e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=BB=95=E5=BC=BA?= Date: Fri, 17 Apr 2020 15:12:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=BAformdata.append=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E4=B8=AA=E5=8F=82=E6=95=B0=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.js b/src/request.js index ea81786a..5a2ce25b 100644 --- a/src/request.js +++ b/src/request.js @@ -62,7 +62,7 @@ export default function upload(option) { }); } - formData.append(option.filename, option.file); + formData.append(option.filename, option.file, option.file?.name); xhr.onerror = function error(e) { option.onError(e); From 97c56145ee3688bdd5ff7b973d093b4ebbadc4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=BB=95=E5=BC=BA?= Date: Fri, 17 Apr 2020 16:22:31 +0800 Subject: [PATCH 2/3] fix ci error --- src/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.js b/src/request.js index 5a2ce25b..c78fc391 100644 --- a/src/request.js +++ b/src/request.js @@ -62,7 +62,7 @@ export default function upload(option) { }); } - formData.append(option.filename, option.file, option.file?.name); + formData.append(option.filename, option.file, option.file.name); xhr.onerror = function error(e) { option.onError(e); From 2879b4892ac40f890241120d0a2d8a9e04d519f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=BB=95=E5=BC=BA?= Date: Mon, 20 Apr 2020 11:23:07 +0800 Subject: [PATCH 3/3] fix ci error --- src/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.js b/src/request.js index c78fc391..672cdc22 100644 --- a/src/request.js +++ b/src/request.js @@ -62,7 +62,7 @@ export default function upload(option) { }); } - formData.append(option.filename, option.file, option.file.name); + formData.append(option.filename, option.file, option.file && option.file.name); xhr.onerror = function error(e) { option.onError(e);