Text Posts
Edit and update text content in existing posts
Image Posts
Add, remove, or replace images in image posts
File Posts
Manage file attachments and add new files
Video Posts
Update video content and add new videos
Supported Post Types
social.plus SDK supports the editing of the following post types:Text Posts
Text Posts
- Content Updates: Modify text content and formatting
- Metadata Changes: Update tags, mentions, and other metadata
- Character Limits: Respect platform character limits
Image Posts
Image Posts
- Add Images: Upload and append new images to existing posts
- Remove Images: Remove specific images from the post
- Replace Images: Replace existing images with new ones
- Maximum Limit: Up to 10 images per post
File Posts
File Posts
- Add Files: Upload and append new files to existing posts
- Remove Files: Remove specific files from the post
- File Types: Support for all common file formats
- Maximum Limit: Up to 10 files per post
Video Posts
Video Posts
- Add Videos: Upload and append new videos to existing posts
- Remove Videos: Remove specific videos from the post
- Video Processing: Automatic transcoding and optimization
- Maximum Limit: Up to 10 videos per post
Permissions and Accountability
Edit Permissions: Users can only edit their own posts, except if you’re an admin or a moderator of a particular community. This functionality encourages responsible interactions and maintains accountability.
Key Features
Ownership Control
Ownership Control
- User Posts: Users can edit their own posts
- Moderator Rights: Community moderators can edit posts within their communities
- Admin Rights: Platform administrators can edit any post
- Permission Validation: SDK automatically validates edit permissions
Transparency Features
Transparency Features
- editedAt Timestamp: Updated automatically upon edit completion
- Edit History: Track when posts were last modified
- UI Indicators: Display “edited” status to other users
Upon completing an edit operation, the SDK updates the
editedAt
property to the current time, reflecting the changes made by the user. You can leverage this timestamp to create a user interface that informs users of edited posts, fostering transparency.Update Text Post
To edit a text post, utilize theeditPost
method in a post repository using AmityTextPostBuilder
class to compose new text content.
Update File Post
To edit a file post, utilize theeditPost
method in a post repository using AmityFilePostBuilder
class to compose a set of new files. The files parameter should include both the current files (if required) and any newly uploaded files you wish to append to the post.
File Management Strategy
Preserving Existing Files
Preserving Existing Files
- Current Files: Retrieve existing files using
getFileInfo()
from child posts - File Array: Maintain current files in the filesData array
- Selective Updates: Choose which files to keep or remove
Adding New Files
Adding New Files
- Upload Process: Use
fileRepository.uploadFile()
for new files - Progress Tracking: Monitor upload progress with progress callback
- Append Strategy: Add new files to existing array
- Maximum Limit: Ensure total files don’t exceed 10 per post
Update Image Post
To edit an image post, utilize theeditPost
method in a post repository using AmityImagePostBuilder
class to compose a set of new images. The images parameter should include both the current images (if required) and any newly uploaded images you wish to append to the post.
Image Processing Features
Image Optimization
Image Optimization
- Automatic Resizing: Images are automatically resized for different viewing contexts
- Format Support: JPEG, PNG, and WebP formats supported
- Quality Compression: Optimized for storage and bandwidth efficiency
- Multiple Resolutions: Generated thumbnails for faster loading
Upload Management
Upload Management
- Progress Callbacks: Real-time upload progress monitoring
- Error Handling: Robust error handling for failed uploads
- Retry Logic: Automatic retry for temporary failures
- Validation: File size and format validation before upload
Update Video Post
To edit a video post, utilize theeditPost
method in a post repository using AmityVideoPostBuilder
class to compose a set of new videos. The videos parameter should include both the current videos (if required) and any newly uploaded videos you wish to append to the post.
Video Processing
Transcoding Features
Transcoding Features
- Multiple Resolutions: Automatic transcoding to multiple resolutions (1080p, 720p, 480p, 360p)
- Format Optimization: Conversion to web-optimized formats
- Thumbnail Generation: Automatic thumbnail creation for video previews
- Streaming Support: Optimized for adaptive streaming playback
Upload Considerations
Upload Considerations
- File Size Limits: Maximum 1GB per video file
- Processing Time: Transcoding may take time based on video length and quality
- Progress Monitoring: Real-time upload and processing progress
- Quality Settings: Configurable quality and compression settings
Limitations and Best Practices
Maximum Media Limit: You can upload a maximum of 10 images/files/videos in a single post. Plan your content accordingly to stay within these limits.
Performance Optimization
Performance Optimization
- Batch Uploads: Upload multiple files efficiently using batch operations
- Progress Indicators: Show upload progress to users for better UX
- Error Recovery: Implement retry logic for failed uploads
- Memory Management: Properly dispose of large media files after upload
User Experience
User Experience
- Edit Indicators: Clearly show when a post has been edited
- Preview Changes: Allow users to preview changes before saving
- Undo Functionality: Consider implementing undo for recent edits
- Loading States: Show appropriate loading states during edit operations
Content Management
Content Management
- Version Control: Keep track of post edit history where needed
- Moderation: Review edited posts if they require re-approval
- Validation: Validate content before allowing edits
- Backup: Consider backing up original content before edits
Common Use Cases
Typo Corrections
Quick text corrections and spelling fixes
Content Updates
Adding new information or updating outdated content
Moderation Edits
Community moderators correcting or improving posts