I have a system that's supposed to convert a byte array (not knowing whether its pdf, txt, or doc) provided to me into a downloadable file. Now usually in ASP.NET MVC I would do it like this.
return File(labTestResult.File, "application/pdf");
That's easy because I know what the filetype is. Now that the filetype could be anything, is there a way to download the file to its appropriate format?