Get the attachments of forum posts

To get the attachments of a post, you must perform the following:

  1. Get the post.
    Get an instance of the specified post. For more information, see For developers: Query forum posts.
  2. Get the attachments.
    To get the attachments, you must call the GetAttachments extension method of the post instance. The method returns an array of MediaContent items, but their actual type is Document.

Here is a code example:

Was this article helpful?