mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 20:34:44 +01:00
Message: Fix "No file" error when downloading media (#2001)
This commit is contained in:
parent
4b7b72592e
commit
43fa66eb61
@ -317,8 +317,11 @@ export function getMessageMediaFormat(
|
||||
} = message.content;
|
||||
const fullVideo = video || getMessageWebPageVideo(message);
|
||||
const size = (video || audio || document)?.size!;
|
||||
if (target === 'download' && IS_PROGRESSIVE_SUPPORTED && size > MAX_BUFFER_SIZE && !IS_OPFS_SUPPORTED) {
|
||||
return ApiMediaFormat.DownloadUrl;
|
||||
if (target === 'download') {
|
||||
if (IS_PROGRESSIVE_SUPPORTED && size > MAX_BUFFER_SIZE && !IS_OPFS_SUPPORTED) {
|
||||
return ApiMediaFormat.DownloadUrl;
|
||||
}
|
||||
return ApiMediaFormat.BlobUrl;
|
||||
}
|
||||
|
||||
if (fullVideo && IS_PROGRESSIVE_SUPPORTED && (
|
||||
|
Loading…
Reference in New Issue
Block a user