From 0a5fe7eebe8f44bdc1c25a483afe0bc7cf5da12d Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 31 Mar 2026 12:34:42 -0600 Subject: [PATCH] Displaying 7z/rar preview when user previews those archives. --- app/src/components/Common.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/components/Common.js b/app/src/components/Common.js index efae402f..aa73b461 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -1144,6 +1144,10 @@ export function isSupportedArchive(mimetype, lowerPath) { if (mimetype.startsWith('application/x-tar')) return true; // Suffix-based detection for tar variants whose mimetype may be the compression type. if (lowerPath.endsWith('.tar') || lowerPath.endsWith('.tar.gz') || lowerPath.endsWith('.tgz') || lowerPath.endsWith('.tar.bz2') || lowerPath.endsWith('.tar.xz')) return true; + // 7z and RAR archives. + if (mimetype.startsWith('application/x-7z-compressed')) return true; + if (mimetype.startsWith('application/x-rar') || mimetype.startsWith('application/vnd.rar')) return true; + if (lowerPath.endsWith('.7z') || lowerPath.endsWith('.rar')) return true; return false; }