def is_file_allowed(self, filename):
        ext = op.splitext(filename)[1].lower()

        if ext.startswith('.'):
            ext = ext[1:]

        if self.allowed_extensions and ext not in self.allowed_extensions:
            return False

        return True
Verify if file can be uploaded.
dataset/ETHPy150Open syrusakbary/Flask-SuperAdmin/flask_superadmin/contrib/fileadmin.py/FileAdmin.is_file_allowed