diff --git a/src/Components/Common/FilePreviewDialog.tsx b/src/Components/Common/FilePreviewDialog.tsx index 9bf9780c7a3..b4443d330ea 100644 --- a/src/Components/Common/FilePreviewDialog.tsx +++ b/src/Components/Common/FilePreviewDialog.tsx @@ -32,6 +32,19 @@ type FilePreviewProps = { fixedWidth?: boolean; }; +const previewExtensions = [ + ".html", + ".htm", + ".pdf", + ".mp4", + ".webm", + ".jpg", + ".jpeg", + ".png", + ".gif", + ".webp", +]; + const FilePreviewDialog = (props: FilePreviewProps) => { const { show, onClose, file_state, setFileState, downloadURL, fileUrl } = props; @@ -130,13 +143,21 @@ const FilePreviewDialog = (props: FilePreviewProps) => { }} pageNumber={page} /> - ) : ( + ) : previewExtensions.includes(file_state.extension) ? ( + ) : ( +