From a3c3ec9f91425637e423331289880aae04d500c6 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Fri, 19 Apr 2024 14:10:29 +0530 Subject: [PATCH] update validateImageForCorruption util function. Signed-off-by: Krishna Gupta --- src/libs/fileDownload/FileUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/fileDownload/FileUtils.ts b/src/libs/fileDownload/FileUtils.ts index d9893d93d2f6..6517a7a28642 100644 --- a/src/libs/fileDownload/FileUtils.ts +++ b/src/libs/fileDownload/FileUtils.ts @@ -242,7 +242,7 @@ function base64ToFile(base64: string, filename: string): File { } function validateImageForCorruption(file: FileObject): Promise { - if (!Str.isImage(file.name ?? '')) { + if (!Str.isImage(file.name ?? '') || !file.uri) { return Promise.resolve(); } return new Promise((resolve, reject) => {