From 472357272506e70103d0f3ced9c0d78d24af0c0a Mon Sep 17 00:00:00 2001 From: anyueling Date: Sat, 30 Jul 2022 13:41:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9md=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: anyueling --- zh-cn/application-dev/reference/apis/js-apis-request.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-request.md b/zh-cn/application-dev/reference/apis/js-apis-request.md index ee268dc89e..59089b247d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-request.md +++ b/zh-cn/application-dev/reference/apis/js-apis-request.md @@ -182,12 +182,12 @@ upload(context: BaseContext, config: UploadConfig): Promise<UploadTask> method: "POST", files: { filename: "test", name: "test", uri: "internal://cache/test.jpg", type: "jpg" }, data: { name: "name123", value: "123" }, - } + }; request.upload(globalThis.abilityContext, uploadConfig).then((data) => { uploadTask = data; }).catch((err) => { console.error('Failed to request the upload. Cause: ' + JSON.stringify(err)); - }) + }); ``` -- GitLab