From 3ba0565b1b5b868561e1da77aec64f31d958a87e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 22 Nov 2023 18:56:30 -0700 Subject: [PATCH] Merge pull request #31768 from situchan/fix-31763 fix android file upload issue (cherry picked from commit 5fb1e057bc6b8aa1418bb465a32b9545b3ee5c6d) --- 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 5bac47fb63ec..618571ddf400 100644 --- a/src/libs/fileDownload/FileUtils.ts +++ b/src/libs/fileDownload/FileUtils.ts @@ -165,7 +165,7 @@ const readFileAsync: ReadFileAsync = (path, fileName, onSuccess, onFailure = () } res.blob() .then((blob) => { - const file = new File([blob], cleanFileName(fileName)); + const file = new File([blob], cleanFileName(fileName), {type: blob.type}); file.source = path; // For some reason, the File object on iOS does not have a uri property // so images aren't uploaded correctly to the backend