parse mimetype using file