Determining the MIME type of a file

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I am having trouble determining the MIME type of a file. Does anybody know
how to do this for a file programmatically? Thanks.
 
I am having trouble determining the MIME type of a file. Does anybody know
how to do this for a file programmatically? Thanks.

You could look up the extension in the registry and see if it has a
"ContentType" key. For example, HKEY_CLASSES_ROOT\.gif has a
"ContentType" of "images/gif".
 
Back
Top