View Source ExTDLib.Method.CancelDownloadFile (ExTDLib v0.0.4)

Stops the downloading of a file. If a file has already been downloaded, does nothing. Returns object_ptr<Ok>.

NameTypeDescription
file_idnumberIdentifier of a file to stop downloading.
only_if_pendingboolPass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server.

More details on telegram's documentation.