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

feat(139): support multipart upload (close: #7444) #7630

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

xrgzs
Copy link
Contributor

@xrgzs xrgzs commented Dec 8, 2024

近期升级到新版个人云,被这个无法上传大文件的问题困扰。

#7444 (comment)

代码首先来自 https://github.com/ykxVK8yL5L/alist/tree/main/drivers/139 ,参考了部分代码,在此向 @ykxVK8yL5L 致谢!

如果文件分片数量大于 100 个,在网页端上传会使用第二个接口 /hcy/file/getUploadUrl 获取上传地址,这里也加上了相关逻辑,支持分片数量超过 100。

加上选项可供用户自定义分片大小,暂未修改原来的分片大小。

  • 目前网页端的分片大小为 20 MB (20971520),实测该值过小可能会拖慢大文件的上传速度,故此处提供选项供用户自行研究。

  • 新版个人云所使用的 EOS 文档(https://ecloud.10086.cn/op-help-center/api/article/40933)中说明“无法上传大小大于 5 GB 的对象”,之前不能上传 5 GB 以上文件的原因在此,故分片大小不要超过 5 GB。

@xhofe xhofe merged commit 016e169 into AlistGo:main Dec 9, 2024
3 checks passed
@xrgzs xrgzs deleted the feat/139-multipart-upload branch December 12, 2024 09:47
long2005a1 added a commit to long2005a1/Long-Cloud that referenced this pull request Dec 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants