code: def _check_file_field(self, field):
          
          is_field = field in self.field_names
          is_file = self.__meta_metadata(field, 'field_type') == 'file'
          if not (is_field and is_file):
              msg = "'%s' is not a field or not a 'file' field" % field
              raise ValueError(msg)
          else:
              return True
docs: Check that field exists and is a file field