feat(139): add option ReportRealSize#8244
Conversation
WalkthroughThis PR addresses issue #8141 by ensuring that the upload size limit is enforced. It modifies the handling of file uploads to correctly calculate and check the total size and content size of uploads, preventing bypassing of the size restrictions. Changes
|
|
请问这个更改是做出了什么改良吗?能解决上传伪成功吗?是否如同标题 去除了绕过大小限制的用法从而正常,主要是新的发行版似乎没有发出这个更改 |
对的,顺便加上了报错功能,之前没有报错,加上后发现上传到第二个分片时那边判断为非法请求就不给继续上传了 |
下次合并分支前能不能考虑把这个改成一个开关?因为目前这还是有一定可玩性的,实验把分片大小改成超过 50GB,能够完整流式传输 50GB 内的文件😊请注意,仅限家庭云实验了,新个人云由于无法流式上传,没有实验。应该会提示权益不足 |
8fb9c04 to
fcb1730
Compare
已修改
新个人云使用单独的分片上传方式,不支持这种玩法,最大分片好像不能超过5GB |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new ReportRealSize option and related XML upload result handling for driver 139. Key changes include:
- Adding the InterLayerUploadResult struct in types.go for XML response parsing.
- Introducing the ReportRealSize configuration field in meta.go.
- Modifying driver.go to use the new ReportRealSize option when uploading and to parse XML responses for error handling.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| drivers/139/types.go | Adds a new struct (InterLayerUploadResult) for XML response parsing. |
| drivers/139/meta.go | Adds the ReportRealSize boolean flag to configuration. |
| drivers/139/driver.go | Uses the ReportRealSize option to set the file size and parses XML responses. |
Comments suppressed due to low confidence (1)
drivers/139/types.go:146
- [nitpick] Consider renaming 'InterLayerUploadResult' to 'InterLayerUploadResponse' for clearer identification that the struct holds XML response data.
type InterLayerUploadResult struct {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Close: #8141