From 254cf6fced149786f506d8724da6b9b90df0d896 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 2 Nov 2023 17:13:00 -0600 Subject: [PATCH] Get the file upload working properly --- src/pages/iou/request/step/IOURequestStepConfirmation.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index 9c17c762c33b..67abb453e4f4 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -110,10 +110,9 @@ function IOURequestStepConfirmation({ if (!file) { Navigation.goBack(ROUTES.MONEY_REQUEST.getRoute(iouType, reportID)); } else { - setReceiptFile({ - ...file, - state: file && requestType === CONST.IOU.REQUEST_TYPE.MANUAL ? CONST.IOU.RECEIPT_STATE.OPEN : CONST.IOU.RECEIPT_STATE.SCANREADY, - }); + const receipt = file; + receipt.state = file && requestType === CONST.IOU.REQUEST_TYPE.MANUAL ? CONST.IOU.RECEIPT_STATE.OPEN : CONST.IOU.RECEIPT_STATE.SCANREADY; + setReceiptFile(receipt); } }); }, [receiptFilename, receiptPath, requestType, iouType, reportID]); @@ -242,7 +241,6 @@ function IOURequestStepConfirmation({ return; } - console.log('[tim', receiptFile); if (receiptFile) { requestMoney(selectedParticipants, trimmedComment, receiptFile); return;