Skip to main content
File posts attach uploaded files to a post. Upload files first, then pass the uploaded file objects or file IDs to the post creation API.
This page focuses on the SDK call that creates the post. See File Handling for upload steps, supported file inputs, and upload constraints.

Uploaded Files

Create posts from file objects or file IDs returned by the file upload flow.

Caption Support

Add text, metadata, mentions, or other SDK-supported post fields alongside the file attachments.

Parameters

Create a File Post

The examples below create a file post in a community. Replace the target with the SDK’s user-feed target when posting to a user.

Notes

  • TypeScript accepts file attachments as { type: "file", fileId }.
  • Android accepts a Set<AmityFile>.
  • iOS accepts [AmityFileData].
  • Flutter accepts List<AmityFile>.
For mixed attachment types, use Mixed Media Posts.

File Handling

Upload files before creating file posts.

Mixed Media Posts

Combine files with other supported media attachments.

Posts Overview

Review post concepts, retrieval, and moderation flows.