Use both name and mime type to decide file syntax