From e81d83b06a82133ec6f87458c3449e41d8181170 Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Wed, 6 Dec 2023 13:20:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20upload.web=20=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/utils/upload.web.js | 4 ++-- lib/utils/upload.web.js | 4 ++-- src/utils/upload.web.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/es/utils/upload.web.js b/es/utils/upload.web.js index 94381ab0..b625d828 100644 --- a/es/utils/upload.web.js +++ b/es/utils/upload.web.js @@ -9,7 +9,7 @@ export class Upload { body: formData2, method: 'POST', }; - const json = await (await fetch(uploadUrl, options)).json(); - return json; + const result = await fetch(uploadUrl, options); + return result; } } diff --git a/lib/utils/upload.web.js b/lib/utils/upload.web.js index aff055cf..43ca1c42 100644 --- a/lib/utils/upload.web.js +++ b/lib/utils/upload.web.js @@ -12,8 +12,8 @@ class Upload { body: formData2, method: 'POST', }; - const json = await (await fetch(uploadUrl, options)).json(); - return json; + const result = await fetch(uploadUrl, options); + return result; } } exports.Upload = Upload; diff --git a/src/utils/upload.web.ts b/src/utils/upload.web.ts index b10b179a..f4e21d14 100644 --- a/src/utils/upload.web.ts +++ b/src/utils/upload.web.ts @@ -19,7 +19,7 @@ export class Upload { method: 'POST', }; - const json = await (await fetch(uploadUrl, options)).json(); - return json; + const result = await fetch(uploadUrl, options); + return result; } }