Skip to content

Commit

Permalink
Merge pull request #29738 from bernhardoj/fix/27992-receipt-image-fai…
Browse files Browse the repository at this point in the history
…l-to-download

Fix can't download scan receipt image
  • Loading branch information
marcaaron authored Oct 18, 2023
2 parents cc85706 + ac5ad67 commit 1d8b6e3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ function extractAttachmentsFromReport(report, reportActions) {
const transaction = TransactionUtils.getTransaction(transactionID);
if (TransactionUtils.hasReceipt(transaction)) {
const {image} = ReceiptUtils.getThumbnailAndImageURIs(transaction);
const isLocalFile = typeof image === 'string' && (image.startsWith('blob:') || image.startsWith('file:'));
attachments.unshift({
source: tryResolveUrlFromApiRoot(image),
isAuthTokenRequired: true,
isAuthTokenRequired: !isLocalFile,
file: {name: transaction.filename},
isReceipt: true,
transactionID,
Expand Down

0 comments on commit 1d8b6e3

Please sign in to comment.