docs: def replace_non_data_file(self, dataset_identifier, params, file_data):
          '''
          Same as create_non_data_file, but replaces a file that already exists in a
          file-based dataset.
  
          WARNING: a table-based dataset cannot be replaced by a file-based dataset.
                   Use create_non_data_file in order to replace.
          '''
          resource = _format_old_api_request(dataid=dataset_identifier, content_type="txt")
  
          if not params.get('method', None):
              params['method'] = 'replaceBlob'
  
          params['id'] = dataset_identifier
  
          return self._perform_request("post", resource, params=params, files=file_data)