title: Determining MIME Type of MAC upload stream file
body: <p>I have a simple web form that sends and email out via .NET C#. Additionally there is an ASP UPLOAD ctrl from which I create a memory stream and attach the stream to the Mail Message...ie no need to save file to file system. </p>
  
  <p>ISSUE: When MAC users dont inlcude extensions on their uploaded files (I am testing for PostedFile.ContentType to determine the file and/or appropriate extension, allowable files RTF, TXT, PDF, DOC, DOCX) it seems like the ContentType comes back as "application/octet"...this makes some sense to me w/o an extension as required by PCs but; still unclear on weather reading the ContentType or extension is a better way to determine what type of file it is before I attach. [Extensionless MAC file will obviously fail any extension test]</p>
  
  <p>Basically, I read the file from the upload ctrl, determine what its ContentType is, strip just the PostedFile.Filename and then reassemble as I create the attachment using the ContentType string in a switch statement to determine and add the correct extension to the attached file  (filename + ext). I did this in order to ensure MAC users that dont use extensions can still upload w/o creating a .ZIP or other package.</p>
  
  <p>Question 1: Is my logic sound with regards to approaching this issue, best practices?
  Question 2: Will all MAC files return as "application/octect" when not using an extension on MAC, and if so, how can someone determine what type of file it really is? (Note: PDF worked fine when not using extensions on MAC platform). </p>
  
  <p>Thanks in advance. 
  If code sample is necessary please advise.</p>