I need to guess the mime type with the purpose of fill the \"Content-Type\" header for some file uploads.
I fail to found a solution for it.
I wish to call somet
How many file types are you talking about? Maybe you can just create a list of types you want to support.
I can imagine these lists to be available on the internet as well, for instance
Just get the file extension using ExtractFileExt
and check it agains one of those lists. A file doesn't have a mime type in it, so you'll need to use either this list of file extensions, or determine the type by reading the file headers, which is harder and just as unreliable.