Zreezy
TTCTheo's Typesafe Cult
•Created by Zreezy on 3/12/2025 in #questions
Best way to handle min width/height in uploadthing route input?
I am having trouble following https://docs.uploadthing.com/file-routes#input and https://docs.uploadthing.com/getting-started/appdir to add an
input
in my route where I deny images that have a width or height less than X (enforce a min width/height).
I tried something like this, but that doesn't seem to work:
I'm confused on how to pass that input
into my route via UploadButton
since I don't seem to have a hook to calc that height/width before it's passed to my route.
Does anyone have any insight on how to handle this sort of thing? The docs could use some more examples on how the input
validations work in the full picture :/1 replies