fix and update
This commit is contained in:
@@ -31,7 +31,7 @@ const EXTENSION_TO_MIME: Record<string, string> = {
|
||||
rar: 'application/vnd.rar',
|
||||
'7z': 'application/x-7z-compressed',
|
||||
json: 'application/json',
|
||||
xml: 'application/xml'
|
||||
apk: 'application/vnd.android.package-archive'
|
||||
};
|
||||
|
||||
const MIME_ALIASES: Record<string, string> = {
|
||||
@@ -110,6 +110,7 @@ export function fileIconLabel(fileName?: string, mimeType?: string) {
|
||||
if (['xls', 'xlsx', 'csv'].includes(extension)) return 'XLS';
|
||||
if (['ppt', 'pptx'].includes(extension)) return 'PPT';
|
||||
if (['zip', 'rar', '7z'].includes(extension)) return 'ZIP';
|
||||
if (extension === 'apk') return 'APK';
|
||||
if (extension) return extension.toUpperCase().slice(0, 4);
|
||||
return 'FILE';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user