-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More changes brought over from #746 but in a non-breaking, less chaotic manner. Goal to make #802 easier
- Loading branch information
1 parent
8aa19e4
commit ba37b13
Showing
5 changed files
with
136 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { createRouteHandler, createUploadthing } from "uploadthing/next-legacy"; | ||
|
||
const f = createUploadthing(); | ||
const router = { | ||
mockRoute: f(["image"]) | ||
.middleware(() => { | ||
throw new Error("This is just a mock route, you cant use it"); | ||
return {}; | ||
}) | ||
.onUploadComplete(() => {}), | ||
}; | ||
|
||
export default createRouteHandler({ | ||
router, | ||
config: { uploadthingSecret: "sk_foo" }, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.