Skip to content

Commit

Permalink
fix: added support for .ico files (#1565)
Browse files Browse the repository at this point in the history
  • Loading branch information
finnar-bin authored Nov 29, 2022
1 parent b9717c9 commit a9210e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export const FileTypePreview: FC<Props> = ({
);
case "png":
case "svg":
case "ico":
return (
<Box
data-cy="file-preview"
Expand Down
1 change: 1 addition & 0 deletions src/apps/media/src/app/components/Thumbnail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ export const Thumbnail: FC<ThumbnailProps> = ({

case "png":
case "svg":
case "ico":
return (
<Card
ref={thumbnailRef}
Expand Down
2 changes: 2 additions & 0 deletions src/apps/media/src/app/utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export function isImage(file: File) {
case "gif":
case "svg":
case "webp":
case "ico":
return true;
}

Expand All @@ -44,6 +45,7 @@ export const fileTypeToColor = (extension: string) => {
case "html":
case "js":
case "css":
case "ico":
return "blue";
case "ots":
case "xls":
Expand Down

0 comments on commit a9210e4

Please sign in to comment.