browser_cancel_download

Summary: Browser Cancel DownloadPOST /api/execute/browser_cancel_download

Aborts an ongoing file transfer immediately, closes the underlying network read socket, and removes any partial temporary data on disk. Routing the cancellation requires both the owning session handle—so the dispatcher targets the correct isolated worker process—and the specific transfer identifier assigned when the download started. Upon receipt, the native CEF download item invokes its cancel callback. It then sends a TCP reset or HTTP/2 termination frame to the remote server and transitions the record's state to `cancelled` inside the session ledger. Invoking this command on a transfer that has already finished or terminated earlier returns cleanly without deleting finalized archives, corrupting completed files, or raising an exception to the client controller during cleanup routines and teardown phases.

Parameters

NameTypeRequiredDescription
context_idstringnoSession handle that owns the active file transfer in multi-process execution environments.
download_idstringyesIdentifier of the in-progress download item to terminate and clean up.

Usage

result = await browser.cancel_download(download_id="value")

See Also