Skip to content

Commit

Permalink
read photo file
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Sep 18, 2023
1 parent 72eca6d commit 39236e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/iou/ReceiptSelector/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 39236e3

Please sign in to comment.