Skip to main content
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.
Structure TypePure file posts have structureType = 'file'System-determined based on attachments
Want to combine files with other media types (images, videos, or audio)? Check out Mixed Media Posts which support up to 10 mixed attachments of any type.
Upload files first using the File Handling Guide, 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
textStringPost content (max 10,000 characters)
filesArray/IDsFile objects (iOS/Android/Flutter) or file IDs (TS/JS)
targetTypeEnumTarget destination (community or user feed)
targetIdStringTarget ID (userId or communityId)
metadataObjectCustom 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

Problem: Files fail to upload or post creation failsSolutions:
  • Check file size (must be under 1GB per file)
  • Verify file is not corrupted or empty
  • Ensure stable internet connection for large files
  • Try uploading files individually if batch upload fails
Problem: Users cannot access or download filesSolutions:
  • Check if file is still available on the server
  • Ensure user has necessary access rights
  • Validate file integrity after upload
Problem: Large files cause slow loading or timeoutsSolutions:
  • Show progress indicators during upload/download
  • Use background upload when possible
  • Compress files before upload when appropriate

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