-
Notifications
You must be signed in to change notification settings - Fork 581
Open
Description
const callback = (taskList) => {
$fetch("http://localhost:2800/task", { method: "post", body: taskList })
.then((res) => {
for (let i = 0; i < res.data.length; i++) {
const ossData = res.data[i];
const client = new OSS({
region: ossData.regionId,
accessKeyId: ossData.accessKeyId,
accessKeySecret: ossData.accessKeySecret,
stsToken: ossData.securityToken,
bucket: ossData.bucketName,
});
//进度条数组
updateFileList.value.push({
name: ossData.path,
fileName: taskList[i].fileName,
fileSize: taskList[i].fileSize,
progress: 0,
});
const progress = (progress, checkpoint) => {};
client
.multipartUpload(ossData.path, fileMap[ossData.fileId], {
partSize: 1024 * 1024,
progress,
})
.then((res) => {})
.catch((e) => {});
}
})
.catch((e) => {});
};多个文件如何更新updateFileList里面的 progress ,progress函数里面,无法获取到是第几个文件在上传
Metadata
Metadata
Assignees
Labels
No labels