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.
The right balance of security and simplicity.
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;
<UploadButton
endpoint="imageUploader" // Typesafe btw
onClientUploadComplete={(response) => ...}
onUploadError={(error) => ...}
/>
I asked for a better S3 for years. UploadThing exists because we got tired of waiting.
A powerful, intuitive dashboard for developers to securely manage and track all uploaded files.

We 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
Get StartedNeed more gigs? More devs? More help convincing your boss? Hit us up
Custom
Schedule a callAll Prices in USD