def model_file_fields(self, model):
        """
        Generator yielding all instances of FileField and its subclasses of a model.
        """
        for field in model._meta.fields:
            if isinstance(field, models.FileField):
                yield field