I have a byte array filled from a file uploaded. But, in another part of the code, I need to know this file type uploaded from the byte[] so I can render the correct content
You don't want to do it that way. Call Path.GetExtension when the file is uploaded, and pass the extension around with the byte[].