Skip to content

Commit

Permalink
feat: add more mime types
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Sep 4, 2024
1 parent a0bac56 commit e3a21a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-jobs-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zag-js/file-utils": minor
---

Add support for more file types in file upload `accept` intellisense
6 changes: 4 additions & 2 deletions packages/utilities/file-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ export type ApplicationFileMimeType =
| "application/vnd.ms-powerpoint"
| "application/vnd.openxmlformats-officedocument.presentationml.presentation"
| "application/rtf"
| "application/x-rar"
| "application/x-7z-compressed"
| "application/x-tar"
| "application/vnd.microsoft.portable-executable"

export type TextFileMimeType = "text/css" | "text/csv" | "text/html" | "text/markdown" | "text/plain"

export type FontFileMimeType = "font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "font/eot"
export type FontFileMimeType = "font/ttf" | "font/otf" | "font/woff" | "font/woff2" | "font/eot" | "font/svg"

export type VideoFileMimeType = "video/mp4" | "video/webm" | "video/ogg" | "video/quicktime" | "video/x-msvideo"

Expand All @@ -48,7 +50,7 @@ export type AudioFileMimeType =
| "audio/flac"
| "audio/x-m4a"

export type FileMimeTypeGroup = "image/*" | "audio/*" | "video/*" | "text/*"
export type FileMimeTypeGroup = "image/*" | "audio/*" | "video/*" | "text/*" | "application/*" | "font/*"

export type FileMimeType =
| ImageFileMimeType
Expand Down

0 comments on commit e3a21a6

Please sign in to comment.