code: def get_file_fields():
      
  
      # get models
  
      all_models = apps.get_models()
  
      # get fields
  
      fields = []
  
      for model in all_models:
          for field in model._meta.get_fields():
              if isinstance(field, models.FileField):
                  fields.append(field)
  
      return fields
docs: Get all fields which are inherited from FileField