feat: track uploads with progress and cancellation
serve_file streams in chunks, updating a shared byte counter and aborting with Interrupted when a cancel flag is set. Each served upload is registered (peer, virtual path, size, live progress, status) and exposed via Client::uploads(); Client::cancel_upload flags a matching in-progress transfer. e2e: the download test now also asserts the uploader recorded a completed upload with the right peer and byte count.
This commit is contained in:
@@ -652,6 +652,8 @@ impl Client {
|
||||
UploadJob {
|
||||
downloader: downloader.clone(),
|
||||
real_path,
|
||||
virtual_path: filename.clone(),
|
||||
size,
|
||||
},
|
||||
);
|
||||
(ctx.peer_registry.clone(), size)
|
||||
|
||||
Reference in New Issue
Block a user