hum... I don't know.. I just use the mimetype that Android gives me. Only if that fails I get from the extension. It's probably never going to be super reliable. 🤔
I will do some research to see if we can improve this somehow. Maybe there is a lib somewhere.
Also: Do you guys take encrypted files? We need more providers for our DM uploads.