Add a file to a topic


The ID of the Circle, Topic that you want to add a file to, the File Path, and a Description. 


Confirmation of the file addition, whether that be a success or failure.

Notes: the FilePath is recorded in the transaction so we can tell if a file with the same name is a different revision or a new file. Here are the developers note:

/// Can do 1 of 2 things:

/// 1) Add new file(s) to the circle and update the metadata for the file

/// 2) Update an existing file's metadata (metadata.ObjectID will be pre-set)

/// This is used by the File Metadata UI pages

/// If a new filename is given to an existing file, this triggers a new revision by this user,

/// this allows a history of the file's name to be kept.

/// If a file is being added and there is an existing entry with matching LocalPath (deleted or not, case-insens.)

/// then the file is added as a new revision and the whole revision chain is undeleted.

/// </summary>

/// <param name="metadata">The metadata describing the file and its metadata</param>


API Definition

public async Task<AddFileReply> AddFile(AddFileRequest request)

C# Structures

public class AddFileRequest {

  public string CircleId;

  public string TopicId;

  public string FilePath;

  public string Description;


public class AddFileReply 


  public ReturnStatus Status;


C# Example code:

public void AddFile(string circleid, string topicId, string filePath)


   AddFileRequest request = new AddFileRequest()

   {CircleId = circleid, TopicId = topicId, Description = "", FilePath = filePath};

   AddFileReply reply = _circle.AddFile(request);