Better file uploads
for developers
Developers deserve better than S3. That's why we made UploadThing, the easier (and safer) alternative. From the button to the server, we've got you covered.
Developers deserve better than S3. That's why we made UploadThing, the easier (and safer) alternative. From the button to the server, we've got you covered.
Authentication happens on your server, the upload happens on ours.
export const fileRouter = {
imageUploader: f({ image: { maxFileSize: "4MB" } })
.middleware(async ({ req }) => {
// This code runs on your server before upload
const user = await auth(req);
// Throw to block uploading
if (!user)
throw new UploadThingError("Unauthorized");
// Return metadata to client
return { userId: user.id };
})
.onUploadComplete(async ({ metadata, file }) => ...),
} satisfies FileRouter;
Theo (t3dotgg)
YouTuber, Creator of T3 Stack, CEO @UploadThingWe wanted pricing to be as simple as possible. No calculator needed.
Everything you need to start uploading!
$0/month
Get startedTheo's Fav
For those with teams or more than 2 gigs of files
$10/month
Upgrade nowNeed more gigs? More devs? More help convincing your boss? Hit us up
Custom
Schedule a call