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) => { diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/index.tsx index 8bca59b11580..93ad8bb87c14 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/index.tsx +++ b/src/pages/iou/request/step/IOURequestStepScan/index.tsx @@ -541,6 +541,7 @@ function IOURequestStepScan({ onDrop={(e) => { const file = e?.dataTransfer?.files[0]; if (file) { + file.uri = URL.createObjectURL(file); setReceiptAndNavigate(file); } }}