feat(mobile): upload engine with preparation, batching states and retries

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-19 02:50:40 +08:00
parent d96e56f653
commit 3ddb0ea2d4
23 changed files with 3232 additions and 12 deletions
+4
View File
@@ -70,6 +70,10 @@ class FakeAdapter implements HttpClientAdapter {
body: options.data,
),
);
if (requestStream != null) {
// 消费请求流(真实服务端会读 body;上传引擎的进度计数流由此驱动)。
await requestStream.drain<Object?>();
}
final (status, body) = await router(options);
if (body == null) {
// 204 等:空体且不带 JSON content-type(transformer 不解码)。