td icon indicating copy to clipboard operation
td copied to clipboard

how to handle situations with "file download has failed or was canceled"?

Open ghost opened this issue 2 months ago • 2 comments

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
  }
}

ghost avatar Oct 20 '25 17:10 ghost

relted to #3482

ghost avatar Oct 20 '25 19:10 ghost

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.

levlam avatar Oct 20 '25 19:10 levlam