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.
Product tags (SDK API). A file post has a text parent and one child per file attachment. TypeScript’s generic createPost and iOS createFilePost expose both text productTags for the parent and attachmentProductTags for the file children. The public Android and Flutter file creators expose neither field. UIKit’s product-tag UI is a separate surface and may support fewer post types; see UIKit Product Tagging.

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.