Ionic v4 File MIME?

I’ve checked StackOverflow, I’ve looked everywhere I know, but I can’t find what I thought would be an easy answer.

How do I get the MIME of a file?

What about doing using substring or its equivalent to read the last three characters and then use a list like this: https://www.sitepoint.com/mime-types-complete-list/ to get the MIME type

1 Like

That’s what I tried doing for a while. Finally found a way to get the metadata, the issue was that IFile wasn’t part of the “import { File } …” statement.

Gotcha.

Pretty new to web development here and don’t know all that is available.

Me too. At least we can stumble through the dark together.

1 Like