Hello,
I've a C# problem. I need to get and check the MIME type from a file without tacking care on is extension (because everyone can change it). I need to be sure that the file i've, is an audio file, such as a mp3 for exemple.
How can I do that ?
Thanks.

Manoj BhoirRank #599 · 4K reputationPosted Aug 8, 2015, 7:07 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Aug 9, 2015, 7:58 PM EDT
Hi,
from the file signature you can know the type of file.
Please refer below link, it might help you
http://refactoringaspnet.blogspot.in/2008/11/how-to-get-content-type-mimetype-of.html
http://www.garykessler.net/library/file_sigs.html
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 9, 2015, 8:50 PM EDT