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;
|
} = message.content;
|
||||||
const fullVideo = video || getMessageWebPageVideo(message);
|
const fullVideo = video || getMessageWebPageVideo(message);
|
||||||
const size = (video || audio || document)?.size!;
|
const size = (video || audio || document)?.size!;
|
||||||
if (target === 'download' && IS_PROGRESSIVE_SUPPORTED && size > MAX_BUFFER_SIZE && !IS_OPFS_SUPPORTED) {
|
if (target === 'download') {
|
||||||
return ApiMediaFormat.DownloadUrl;
|
if (IS_PROGRESSIVE_SUPPORTED && size > MAX_BUFFER_SIZE && !IS_OPFS_SUPPORTED) {
|
||||||
|
return ApiMediaFormat.DownloadUrl;
|
||||||
|
}
|
||||||
|
return ApiMediaFormat.BlobUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullVideo && IS_PROGRESSIVE_SUPPORTED && (
|
if (fullVideo && IS_PROGRESSIVE_SUPPORTED && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user