优化大文件稳定并发传输与打包流程
This commit is contained in:
@@ -86,3 +86,18 @@ POST /qft/upload/finish
|
||||
```
|
||||
|
||||
Windows preallocates a `.qftpart`, writes chunks at explicit offsets, verifies SHA-256, then renames to the final file. Per-file worker count is capped at 8; chunk size is selected from 4/8/16 MiB by file size.
|
||||
|
||||
Repeated `init` requests carrying the same `X-QFT-Upload-Key` resume the matching active upload session. The response may include a `missing` chunk-index array; the client sends only those chunks. Chunk completion is recorded only after the positioned write reaches stable storage.
|
||||
|
||||
## 5. Windows → Android direct download
|
||||
|
||||
Files of at least 32 MiB use up to 8 parallel bounded range requests:
|
||||
|
||||
```text
|
||||
GET /qft/download
|
||||
Range: bytes=<start>-<end>
|
||||
```
|
||||
|
||||
Android preallocates an app-private `.qftpart`, writes each range at its fixed offset and persists a separate completion bitmap. A reconnect or process restart downloads only missing ranges. After every range is present, Android verifies the QR-carried SHA-256 before publishing the file to `Downloads/QFT`.
|
||||
|
||||
The Android `WifiNetworkSpecifier` request remains registered for the entire transfer page. It is released when the user returns to the home page (or the Activity is destroyed); a replacement `Network` delivered after a brief radio loss is adopted by subsequent chunk/range retries.
|
||||
|
||||
Reference in New Issue
Block a user