From e97826be1407e726d87cc13121b3a9cb5487bc69 Mon Sep 17 00:00:00 2001 From: David Mzareulyan Date: Sat, 25 Jan 2025 14:29:49 +0300 Subject: [PATCH] Detect video file by URL extension --- src/components/post/post-attachments.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/post/post-attachments.jsx b/src/components/post/post-attachments.jsx index e69e077b..90ab3542 100644 --- a/src/components/post/post-attachments.jsx +++ b/src/components/post/post-attachments.jsx @@ -22,6 +22,12 @@ const supportedVideoTypes = Object.entries(videoTypes) video = null; const looksLikeAVideoFile = (attachment) => { + if (attachment.inProgress) { + return false; + } + if (attachment.url.endsWith('.mp4')) { + return true; + } const lowercaseFileName = attachment.fileName.toLowerCase(); for (const extension of supportedVideoTypes) {