Check for ability to upload file before doing it
Hi all, I'm integrating a limit in my app, in which the free tier allows for X number of files and X number of audio files hours a month.
I'm using UploadThing for the file upload and I think it's great, but I want to understand if there's a way to do this kind of checks (maybe at the middleware level) before starting the upload on the UT servers.
I know that I can check for this using the
onBeforeUploadBegin
handle on the uploadthing client library, but I would like to also implement this check on my backend.
Thanks in advance, and once I've finished building my app (almost there) I'll be more than happy to become a paid user!1 Reply
also, I would add, is there something happening on UT? because after file upload my server fails on this:
it never happened before, and I'm trying to understand if it's something on my side (but I didn't touch the code) or UT side having some kind of issues... Thanks!