Uploadthing onUploadComplete file size is undefined

Hey all, the property file on the parameter of onUploadComplete callback should have a size property that is not undefined based on its type UploadedFile, but this is not the case. I've tried both on local and in production on vercel and I always get file.size as undefined. Is there something wrong in the implementation or is the type UploadedFile wrong and the file size is not actually added to the object?
1 Reply
icomad
icomadOP2y ago
Looking through the codebase I found out that in the conditionalDevServer method when simulating the file upload webhook callback the filesize is not present in the post request body, adding it solves the problem but only in development.
Want results from more Discord servers?
Add your server