api.cancelDownloadFile()
Stops the downloading of a file. If a file has already been downloaded, does nothing
Parameters
CancelDownloadFileParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
fileId | number | Identifier of a file to stop downloading |
onlyIfPending | boolean | Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'cancelDownloadFile' | 'error'
airgram: Airgram
request: {
method: 'cancelDownloadFile'
params: CancelDownloadFileParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}