Add a multipart encoder to GutenbergKitHTTP and delete the duplicated multipartBodyStream
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 ios/Sources/GutenbergKitHTTP/MultipartPart.swift 和 RequestBody.swift 开始,将 parser 与 makePipedFileSliceStream 进行比较。然后检查 MediaUploadServer.swift,追踪 multipartBodyStream 和 writeAll。完成的标准是:encoder 会流式传输所有 MultipartPart 值,media re-encode 路径会使用它,并且删除重复的 helper,同时不会丢失非文件部分。
由索引模型根据 Issue 内容生成。
描述
Summary
GutenbergKitHTTP has a multipart parser (MultipartPart.parse / parseChunked) but no encoder. The only multipart-building code is MediaUploadServer.multipartBodyStream, which is file-only, hand-rolled, and duplicates RequestBody.makePipedFileSliceStream nearly verbatim — its own doc comment notes it uses "the same pattern as" that helper.
Surfaced during the #357 upload-relay review.
Proposal
Add the encode counterpart to GutenbergKitHTTP: a multipart encoder that takes [MultipartPart] (+ boundary) and streams each part's RequestBody through the same bound-stream primitive makePipedFileSliceStream already uses.
Then:
- The media-upload re-encode path builds
[processed-file part] + [original non-file parts]and calls the encoder, instead of hand-writing the multipart. - Delete
MediaUploadServer.multipartBodyStream/writeAll. GutenbergKitHTTPgains a symmetric parse ⇄ encode pair.
Context
Split out of #357. The immediate need there — forwarding post / additionalData through the re-encode path — is handled inline via a preamble extension of multipartBodyStream. This issue tracks the cleaner refactor that also removes the duplication.
Files
ios/Sources/GutenbergKitHTTP/MultipartPart.swift— parserios/Sources/GutenbergKitHTTP/RequestBody.swift—makePipedFileSliceStreamios/Sources/GutenbergKit/Sources/Media/MediaUploadServer.swift—multipartBodyStream(to delete)
- 主要语言
- JavaScript
- 星标
- 29
- 派生
- 7
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 71
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wordpress-mobile/GutenbergKit 的其他 Issue
-
[Type] Bug [Type] Code Quality iOS
难度 2/5 1-3 小时 新手友好度 88/100
wordpress-mobile/GutenbergKit#668 ·
维护者通常 1 天内回复
-
[Type] Bug [Type] Performance iOS
难度 2/5 1-3 小时 新手友好度 88/100
wordpress-mobile/GutenbergKit#666 ·
维护者通常 1 天内回复
-
[Type] Bug iOS
难度 2/5 1-3 小时 新手友好度 78/100
wordpress-mobile/GutenbergKit#664 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
wordpress-mobile/GutenbergKit#522 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
wordpress-mobile/GutenbergKit#443 ·
维护者通常 1 天内回复
查看 wordpress-mobile/GutenbergKit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
Yomguithereal/mnemonist#247 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
up-for-grabs/up-for-grabs.net#6330 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
TheOdinProject/curriculum#31490 ·
维护者通常 1 天内回复
-
bug require-triage
难度 2/5 1-3 小时 新手友好度 72/100
expressjs/expressjs.com#2549 · 1 个 reaction ·
维护者通常 1 天内回复
-
Docs: no path for someone who just wants to try Indiekit可能已有人在做 @rmdes 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
getindiekit/indiekit#1028 ·
维护者通常 1 天内回复