feat(123_open): update upload api v2#976
Merged
xrgzs merged 1 commit intoOpenListTeam:mainfrom Aug 6, 2025
Merged
Conversation
dezhishen
previously approved these changes
Aug 4, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the 123 Open cloud storage driver to use the V2 upload API, implementing MD5-based instant upload functionality for copy operations. The changes modernize the upload process by moving from V1 to V2 endpoints and introducing multipart form uploads with MD5 verification.
- Updated API endpoints from V1 to V2 for upload operations
- Replaced URL-based chunk upload with multipart form data upload including MD5 verification
- Added copy functionality using upload + MD5 instant upload feature
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| drivers/123_open/util.go | Updated API endpoints to V2 and removed unused V1 endpoints |
| drivers/123_open/upload.go | Refactored upload logic to use multipart forms with MD5 and moved completion logic |
| drivers/123_open/types.go | Updated response structures for V2 API and removed obsolete types |
| drivers/123_open/driver.go | Added copy functionality and enhanced Put method with proper completion polling |
Comments suppressed due to low confidence (1)
5b8ecb7 to
2f56c9b
Compare
j2rong4cn
approved these changes
Aug 6, 2025
Member
Author
|
试了下,传了个3GB的文件,没有问题,分片大小为 "sliceSize": 67108864, |
j2rong4cn
reviewed
Aug 14, 2025
| if err != nil { | ||
| return err | ||
| } | ||
| _, err = utils.CopyWithBuffer(fw, rateLimitedRd) |
Member
There was a problem hiding this comment.
为什么要用v2?v2支有表单吗?
使用表单即使是*os.File也需要读取到内存
Member
Author
There was a problem hiding this comment.
V2 只有表单
用 io.Pipe 优化一下内存占用?
Member
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.