Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipartUpload 进度100%,实际响应未结束 #1341

Open
lianzujiao opened this issue Nov 21, 2024 · 1 comment
Open

multipartUpload 进度100%,实际响应未结束 #1341

lianzujiao opened this issue Nov 21, 2024 · 1 comment

Comments

@lianzujiao
Copy link

lianzujiao commented Nov 21, 2024

  • Browser Version or Node Version:Chrome/110.0.5481.52
  • ali-oss Version:6.17.1
  • Mini Showcase Repository:
  • Network Resoponse Header x-oss-request-id: RequestError: XHR error ( req "error" ) -1 ( connected: false, keepalive socket: false ) headers: { }

使用 multipartUpload ,上传超大文件 34.1G , 在 progress 回调中 进度已达到100%时未响应结果,需要等待约5分钟之后上传才结束,控制台打印内容如下图

multipartUpload 方法配置如下

const result = await client.multipartUpload(dirName, file, {
            checkpoint: abortCheckpoint,
            partSize: 1024 * 1024 * 6,
            //@ts-ignore
            progress: (p, cpt) => {
                // 为了实现断点上传,您可以在上传过程中保存断点信息(checkpoint)。发生上传错误后,将已保存的checkpoint作为参数传递给multipartUpload,此时将从上次上传失败的地方继续上传。
                abortCheckpoint = cpt
                // 获取上传进度。
                progressPercent.value = Number((p * 100).toFixed(2))
            }
        })
@YunZZY
Copy link
Collaborator

YunZZY commented Nov 25, 2024

在所有分片上传完成后,会执行CompleteMultipartUpload去完成整个文件的分片上传,所以会有进度达到100%,但还未响应的情况。根据您提供的分片信息,您的分片个数较多,所以CompleteMultipartUpload会持续一段时间,您可以尝试调大分片大小,更多的您可以在官网咨询下售后服务

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants