I have some input files of different mimetypes that get uploaded and then dynamically routed. The dynamic routing is determined by the mimetype of the input file. These types goes beyond standard things like application/json, xml and extend to geospatial file mimetypes, etc.
My question is, how do I determine the mimetype from an input file? Does the browser somehow auto-resolve it when it gets uploaded? Do I need to parse the input stream in my backend code using some fancy IO lib?