Skip to content

Commit

Permalink
fix: patch mime-types to make us edge-compat (#126)
Browse files Browse the repository at this point in the history
* path mime-types to make us edge-compat

* inhouse

* .

* sync lock

* changeset

* oops

---------

Co-authored-by: Mark R. Florkowski <[email protected]>
  • Loading branch information
juliusmarminge and markflorkowski committed Jun 5, 2023
1 parent 4fde69f commit 0046018
Show file tree
Hide file tree
Showing 8 changed files with 8,691 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-keys-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"uploadthing": minor
---

vendor mime-types to make uploadthing edge-compat
2 changes: 2 additions & 0 deletions examples/appdir/src/app/api/uploadthing/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { createNextRouteHandler } from "uploadthing/next";

import { uploadRouter } from "~/server/uploadthing";

export const runtime = "edge";

export const { GET, POST } = createNextRouteHandler({
router: uploadRouter,
});
4 changes: 0 additions & 4 deletions packages/uploadthing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"mime-types": "^2.1.35"
},
"devDependencies": {
"@types/mime-types": "2.1.1",
"@types/node": "18.16.0",
"@uploadthing/eslint-config": "0.1.0",
"@uploadthing/tsconfig": "0.1.0",
Expand Down
23 changes: 23 additions & 0 deletions packages/uploadthing/src/mime-types/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(The MIT License)

Copyright (c) 2014 Jonathan Ong <[email protected]>
Copyright (c) 2015 Douglas Christopher Wilson <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

1 comment on commit 0046018

@vercel
Copy link

@vercel vercel bot commented on 0046018 Jun 5, 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.