diff --git a/src/components/messageStream/bubbles/FileDocBubble.tsx b/src/components/messageStream/bubbles/FileDocBubble.tsx index fa8e492..864e07f 100644 --- a/src/components/messageStream/bubbles/FileDocBubble.tsx +++ b/src/components/messageStream/bubbles/FileDocBubble.tsx @@ -19,6 +19,7 @@ function AttachmentRow({ postId, att }: { postId: string; att: Attachment }) { const { Icon, color } = fileIcon({ mime: att.mime, filename: att.filename }); const displayFilename = filenameWithExtension(att.filename, att.mime); const [isDownloading, setIsDownloading] = useState(false); + const [previewFailed, setPreviewFailed] = useState(false); const handleDownload = async () => { if (isDownloading) return; @@ -39,11 +40,12 @@ function AttachmentRow({ postId, att }: { postId: string; att: Attachment }) { return (
- {previewUrl ? ( + {previewUrl && !previewFailed ? ( {displayFilename} setPreviewFailed(true)} className="h-[52px] w-[52px] shrink-0 rounded-full object-cover" /> ) : (