Skip to content

Commit

Permalink
Merge pull request #10 from beclab/fix/filetype
Browse files Browse the repository at this point in the history
fix: update file type
  • Loading branch information
wushuangs authored Nov 26, 2024
2 parents 10875a5 + 4683ebf commit 5997783
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytetrade/core",
"version": "0.3.69",
"version": "0.3.70",
"description": "didvault core module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function getFileIcon(fileName: string): string {
if (!suffix) return 'other';
suffix = suffix.toLocaleLowerCase();

const imgList = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'heic'];
const imgList = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'heic', 'webp', 'svg'];
result = imgList.find((item) => item === suffix);
if (result) return 'image';
// txt
Expand Down Expand Up @@ -208,7 +208,7 @@ export function getFileType(fileName: string): string {
result = mp4List.find((item) => item === suffix);
if (result) return 'MP4';

const aviList = ['avi', 'mov', 'webp', 'wmv', 'm2v', 'mkv', 'rmvb', 'flv'];
const aviList = ['avi', 'mov', 'wmv', 'm2v', 'mkv', 'rmvb', 'flv'];
result = aviList.find((item) => item === suffix);
if (result) return 'VIDEO';

Expand Down

0 comments on commit 5997783

Please sign in to comment.