Check file types before uploading.