HarmonyOS Remote Communication Kit能不能上传多个文件?

import { BusinessError } from '@kit.BasicServicesKit';

let uploadFromFile: rcp.UploadFromFile = {
  fileOrPath: "http://huawei.com"
}
const session = rcp.createSession();
session.uploadFromFile("http://huawei.com", uploadFromFile).then((response) => {
  console.info(`Response succeed: ${response}`);
}).catch((err: BusinessError) => {
  console.error(`err: err code is ${err.code}, err message is ${JSON.stringify(err)}`);
});

上面是官网的示例代码只能上传一个文件,rcp能不能一次性上传多个文件?

阅读 398
logo
HarmonyOS
子站问答
访问
宣传栏