Share documents, PDFs, spreadsheets, and other files with your community. File posts support up to 10 files per post with 1GB maximum per file, perfect for sharing resources and documents.

Multi-File Support

Upload up to 10 files per post with any format

Large File Capacity

Support for files up to 1GB each for document sharing

Overview

File posts allow users to share documents, PDFs, spreadsheets, and other file formats in their social feeds. The social.plus SDK supports up to 10 files per post with a maximum size of 1 GB per file.
RequirementLimitNotes
File CountMaximum 10 filesPer single post
File SizeUp to 1GB per filePlatform may have lower limits
File FormatsAll supported typesPDF, DOC, XLS, ZIP, etc.
Upload files first using the File Repository, then create posts with those file references.
1

Upload Files

Use the File Repository to upload your documents and get file IDs
2

Create Post

Use the file IDs in your post creation request with descriptions
3

Handle Response

The post will contain parent and child posts for each file

Parameters

ParameterTypeRequiredDescription
textStringYesPost content (max 20,000 characters)
filesArray/IDsYesFile objects (iOS/Android/Flutter) or file IDs (TS/JS)
targetTypeEnumYesTarget destination (community or user feed)
tagsArrayNoSearchable tags (not available in Flutter)
metadataObjectNoCustom fields for extended functionality
func createFilePostExample(files: [AmityFileData], text: String) async {
    // Build your post structure
    let builder = AmityFilePostBuilder()
    builder.setText(text)
    builder.setFiles(files)
    // Create a post from the builder
    do {
        let post = try await postRepository.createFilePost(builder, targetId: nil, targetType: .user, metadata: nil, mentionees: nil)
    } catch {
        // Handle error here
    }
}

Troubleshooting

Common Use Cases

Document Sharing

Share PDFs, Word documents, and presentations with teams

Resource Distribution

Distribute templates, guides, and reference materials

Code Sharing

Share code samples, configuration files, and scripts

Archive Distribution

Share compressed archives with multiple related files