Skip to content

Commit

Permalink
fix: improper MIME type mapping of precise MIME types (#215)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladislav Zimnikov <[email protected]>
  • Loading branch information
Mr0Bread and Vladislav Zimnikov authored Jul 13, 2023
1 parent a6c969e commit e4f650c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-crabs-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"uploadthing": patch
---

fix(uploadthing): fixed incorrect mapping of precise MIME types
1 change: 1 addition & 0 deletions packages/uploadthing/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export const generateMimeTypes = (fileTypes: string[]) => {
const accepted = fileTypes.map((type) => {
if (type === "blob") return "blob";
if (type === "pdf") return "application/pdf";
if (type.includes("/")) return type;
else return `${type}/*`;
});

Expand Down

1 comment on commit e4f650c

@vercel
Copy link

@vercel vercel bot commented on e4f650c Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.