Get EXIF data from the file before uploading to upload thing

I am playing around with uploadthing (great stuff, btw). I am wondering how I can do stuff to the actual file that is uploaded (in my case, I'm going to use an npm package to inspect the image's EXIF data) but I'm struggling to find the best place to do this... I originally thought I could inspect the request on my server before sending the file off to upload thing and then pass the EXIF data in my metadata but I couldnt seem to find the image in the request to my file router (maybe I missed it?) Now I am thinking of doing something silly on the client side but stopped myself and figured I would ask the supercharged melons in this chat 🧠 ty
2 Replies
myk.eth
myk.ethOP•2y ago
oooo req.body.files... hmmm im gonna go down this rabbit hole
Sturlen
Sturlen•2y ago
I don't think this is currently possible, as the file is sent directly from the user to UT, without touching your server. EXIF data is inside the file itself so you can't get that from the request might be possible in the future: https://discord.com/channels/966627436387266600/1102510616326967306/1128727161877045359 though checking the file on the client side before it's sent could be possible
Want results from more Discord servers?
Add your server