td
td copied to clipboard
how to handle situations with "file download has failed or was canceled"?
i have some files, all of them are sorta valid but when i attempt to download some of them i am getting
{
_: 'error',
code: 400,
message: 'File download has failed or was canceled'
}
{
_: 'file',
id: 5176,
size: 23210,
expected_size: 23210,
local: {
_: 'localFile',
path: '',
can_be_downloaded: true,
can_be_deleted: false,
is_downloading_active: false,
is_downloading_completed: false,
download_offset: 0,
downloaded_prefix_size: 0,
downloaded_size: 0
},
remote: {
_: 'remoteFile',
id: 'x',
unique_id: 'y',
is_uploading_active: false,
is_uploading_completed: true,
uploaded_size: 23210
}
}
relted to #3482
You can check TDLib logs to see the exact cause of the error. For example, deleted profile photos can't be downloaded, but if this is the cause, then you will receive updateUser soon.