0

File uploads (UploadThing / Blob)

Filesused in ~60% of apps

Every job board needs resume uploads and company logos. This is also where junior code leaks: a route that streams a 50MB PDF through a Server Action, a download URL that hands any user any applicant's resume, or an upload that trusts the browser's claimed file type. Uploads are where validation, authorization, and platform limits all collide at once.

Core idea. A file upload is just a multipart POST that lands a blob in object storage and a row (the metadata + URL) in your database. Two non-negotiables: validate type/size on the server, and authorize every read — a storage URL is a capability, so only the owner should be able to fetch it. And know your platform's limit: Vercel Blob caps server-side uploads at 4.5MB, so anything bigger must go browser → storage directly (client uploads).
Playground, this isn't a screenshot
VALIDATION TIMING
type
quiet
blur
quiet
submit
validates
Pick a timing mode, then type a bad email and watch WHEN the error appears.

Same field, three feels: onChange nags as you type, onBlur waits until you leave, onSubmit stays quiet until you try. Submit always checks everything.

↑ play a little first, then dig in