From 8662b910802b48c9914ec234b06a206c6f874ff5 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Sun, 4 Jun 2023 11:35:14 +0300 Subject: [PATCH] Fix AttachmentCarousel: don't try to infer file name Attachments that don't have the original filename attribute will be handled by the default logic for missing filenames --- src/components/AttachmentCarousel/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index 6ae3214cd32a..778044586172 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -164,7 +164,7 @@ class AttachmentCarousel extends React.Component { attachments.unshift({ source: tryResolveUrlFromApiRoot(expensifySource || attribs.src), isAuthTokenRequired: Boolean(expensifySource), - file: {name: attribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE] || attribs.src.split('/').pop()}, + file: {name: attribs[CONST.ATTACHMENT_ORIGINAL_FILENAME_ATTRIBUTE]}, }); }, });