def is_file_allowed(self, filename):
        if not self.allowed_extensions:
            return True

        return ('.' in filename and
                filename.rsplit('.', 1)[1].lower() in
                map(lambda x: x.lower(), self.allowed_extensions))
Check if file extension is allowed.
dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/form/upload.py/FileUploadField.is_file_allowed