diff --git a/src/components/ReportActionItem/MoneyRequestView.js b/src/components/ReportActionItem/MoneyRequestView.js index e03dd6e4744c..5632d3c22e7d 100644 --- a/src/components/ReportActionItem/MoneyRequestView.js +++ b/src/components/ReportActionItem/MoneyRequestView.js @@ -247,6 +247,7 @@ function MoneyRequestView({report, parentReport, parentReportActions, policyCate thumbnail={receiptURIs.thumbnail} image={receiptURIs.image} isLocalFile={receiptURIs.isLocalFile} + filename={receiptURIs.filename} transaction={transaction} enablePreviewModal canEditReceipt={canEditReceipt} diff --git a/src/components/ReportActionItem/ReportActionItemImage.tsx b/src/components/ReportActionItem/ReportActionItemImage.tsx index e71eb6834cc7..d1fc72767f56 100644 --- a/src/components/ReportActionItem/ReportActionItemImage.tsx +++ b/src/components/ReportActionItem/ReportActionItemImage.tsx @@ -34,6 +34,9 @@ type ReportActionItemImageProps = { /** whether the receipt can be replaced */ canEditReceipt?: boolean; + + /** Filename of attachment */ + filename?: string; }; /** @@ -42,7 +45,7 @@ type ReportActionItemImageProps = { * and optional preview modal as well. */ -function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, transaction, canEditReceipt = false, isLocalFile = false}: ReportActionItemImageProps) { +function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, transaction, canEditReceipt = false, isLocalFile = false, filename}: ReportActionItemImageProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const imageSource = tryResolveUrlFromApiRoot(image ?? ''); @@ -86,7 +89,7 @@ function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, tr isReceiptAttachment canEditReceipt={canEditReceipt} allowDownload - originalFileName={transaction?.filename} + originalFileName={filename} > {({show}) => (