I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to this question only in .Net.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Urlmon.dll, there’s a function called
FindMimeFromData.From the documentation
So, read the first (up to) 256 bytes from the file and pass it to
FindMimeFromData.