How to upload a PDF file to uploadthing from a route.ts file
This function is being called from a route.ts file. Im getting a vague error relating to some regex match in uploadthings source:
207 | // Pull out numbers from strings like
6.0.0, ^6.4, ~6.4.0208 | const semverRegex = /(\d+).?(\d+)?.?(\d+)?/;
209 | const requiredMatch = required.match(semverRegex);| ^
210 | if (!requiredMatch?.[0]) {
211 | throw new Error(
Invalid semver requirement: ${required});212 | } {
From the documentation it seems like this is done very similarly with FormData files in an in-component server action, and I dont see what the difference would be here.
