Convert function to get a file ext from mime type