I am looking to get the file type of a file without its extension. I have found some links noted below, but I when I use the code, it seems to always return ?application/octet-stream?. I have tested Word 2007 documents and other file formats with no success.
Just a bit of background, we store supporting documents in the DB and I would like to know what file format they are. We do have the extension saved but sometimes it is the incorrect extension for that file.
Some links that I have found:
http://stackoverflow.com/questions/1437382/get-file-type-in-net
I?ve tried all of the examples from the link below but with no luck.
http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature
Maybe I am doing something wrong, any help would be much appreciated.
Using VS 2010, Windows 7, Oracle 11 DB.
Thanks
Just a bit of background, we store supporting documents in the DB and I would like to know what file format they are. We do have the extension saved but sometimes it is the incorrect extension for that file.
Some links that I have found:
http://stackoverflow.com/questions/1437382/get-file-type-in-net
I?ve tried all of the examples from the link below but with no luck.
http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature
Maybe I am doing something wrong, any help would be much appreciated.
Using VS 2010, Windows 7, Oracle 11 DB.
Thanks