title: Is it possible to get the file extension or type from a file loaded into MemoryStream?
body: <p>I am creating a service in C# that is to be used by an ASP.Net Web API that will process and store files.</p>
  
  <p>As part of the Web API I take the file(s) and store them in <code>MemoryStream</code>s which are then passed through to a service for actual processing and storage.</p>
  
  <p>Part of the service will be to generate a new filename for each of the files.</p>
  
  <p>so that leads me to the question, is it possible to find out what file type/extension the file was now that it's in a MemoryStream?</p>