checking mime type instead of extennsion