0

A file gets downloaded and populated in a Stream object in C#. Is there any way to identify the content type of it using some encoded charecters. the responce object is lost.

swifty
  • 165
  • 1
  • 1
  • 17
  • Possible duplicate of [How do you check a file type when there is no extension in c#](https://stackoverflow.com/questions/9747278/how-do-you-check-a-file-type-when-there-is-no-extension-in-c-sharp) – ProgrammingLlama Mar 10 '18 at 08:27
  • [Also relevant](https://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature?noredirect=1&lq=1) – ProgrammingLlama Mar 10 '18 at 08:27
  • [Relevant](https://stackoverflow.com/questions/1654846/in-c-how-can-i-know-the-file-type-from-a-byte) – ProgrammingLlama Mar 10 '18 at 08:28
  • [Not SO but related](https://gyorgybalassy.wordpress.com/2013/08/04/mime-types-sniffing-in-c-sharp/) using [`urlmon.dll`](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775107(v=vs.85)) – ProgrammingLlama Mar 10 '18 at 08:29

0 Answers0