From 39236e3d93223089a05352b6bdc5b573cbe3d19e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 18 Sep 2023 14:42:12 +0800 Subject: [PATCH] read photo file --- src/pages/iou/ReceiptSelector/index.native.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/ReceiptSelector/index.native.js b/src/pages/iou/ReceiptSelector/index.native.js index 427dfc542910..36f883ad08e5 100644 --- a/src/pages/iou/ReceiptSelector/index.native.js +++ b/src/pages/iou/ReceiptSelector/index.native.js @@ -201,10 +201,14 @@ function ReceiptSelector({route, report, iou, transactionID}) { flash: flash ? 'on' : 'off', }) .then((photo) => { - IOU.setMoneyRequestReceipt(`file://${photo.path}`, photo.path); + const filePath = `file://${photo.path}`; + IOU.setMoneyRequestReceipt(filePath, photo.path); if (transactionID) { - IOU.replaceReceipt(transactionID, photo, `file://${photo.path}`); + FileUtils.readFileAsync(filePath, photo.path).then((receipt) => { + IOU.replaceReceipt(transactionID, receipt, filePath); + }); + Navigation.dismissModal(); return; }