MediaType.EnsuredType ++++++++++++++++++ Media type ensured is better. MWG has a list of byte sequences and other matching criteria that allows it to make a guess at the file type. Generally it's pretty good. However there are two concerns with it. One is that it is a guess. If the probability is over 70% we list it otherwise, there is nothing. Many formats are notoriously difficult as they have no set format. Txt files are a good example of a file that may or may not have a probability over 70%. The second issue is that mediatype.ensured is a list instead of a single answer, as more than one format could be probable. This means that you could end up with a number of mediatypes listed.
If possible can you provide the link for me to test the behavior at my end?
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.
Community Help Hub
New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.