metadata middleware

https://docs.uploadthing.com/file-routes#middleware How to pass metadata collected from the page containing <UploadDropzone>, to be used by onUploadComplete()?
File Routes - UploadThing Docs
File Routes is a core concept of UploadThing that defines what your users can upload
1 Reply
#snuglife
#snuglife3mo ago
I'm also curious how to get data from the component to the onUploadComplete function, because I want data from both the upload and the file. One brute force option is to upload the file then fetch it, but the option I went with (I don't like it) is to use the upload button's onChange handler to save the file data in state (and run the upload function), and then in onClientUploadComplete() I should have access to both the file data and the upload data.
Want results from more Discord servers?
Add your server