get mime type from file name first