From 48281ddf86ee8199f23d7bd234ee4420ad863d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=98=AD?= <81747598+lan-yonghui@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:02:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BB=E6=9C=BA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=A7=A3=E5=8E=8B=E6=96=87=E4=BB=B6=20mimetype=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=A2=9E=E5=8A=A0=20(#6437)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/util.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/utils/util.ts b/frontend/src/utils/util.ts index b273f2ef4..655e36027 100644 --- a/frontend/src/utils/util.ts +++ b/frontend/src/utils/util.ts @@ -194,6 +194,8 @@ let icons = new Map([ ['.zip', 'p-file-zip'], ['.gz', 'p-file-zip'], ['.tar.bz2', 'p-file-zip'], + ['.bz2', 'p-file-zip'], + ['.xz', 'p-file-zip'], ['.tar', 'p-file-zip'], ['.tar.gz', 'p-file-zip'], ['.war', 'p-file-zip'], @@ -569,7 +571,7 @@ export function emptyLineFilter(str: string, spilt: string) { // 文件类型映射 let fileTypes = { image: ['.jpg', '.jpeg', '.png', '.bmp', '.gif', '.tiff', '.ico', '.svg', '.webp'], - compress: ['.zip', '.rar', '.gz', '.war', '.tgz', '.7z', '.tar.gz', '.tar'], + compress: ['.zip', '.rar', '.gz', '.war', '.tgz', '.7z', '.tar.gz', '.tar', '.bz2', '.xz', '.tar.bz2', '.tar.xz'], video: ['.mp4', '.webm', '.mov', '.wmv', '.mkv', '.avi', '.wma', '.flv'], audio: ['.mp3', '.wav', '.wma', '.ape', '.acc', '.ogg', '.flac'], pdf: ['.pdf'],