File Sharing
Better Messages allows users to share files, images, videos, and documents directly in conversations with support for resumable uploads and file access protection.
How it works
Users can attach files to their messages using the attachment button in the message input area. The plugin supports a wide range of file types including images, videos, documents, and archives. Uploaded files are stored in your WordPress media directory.
For large files, the plugin supports resumable uploads using the TUS protocol, ensuring files can be uploaded reliably even on slow or unstable connections. If an upload is interrupted, it automatically resumes from where it left off.
File access protection is available through a proxy system that serves files through your WordPress server instead of exposing direct URLs. This prevents unauthorized users from accessing files by guessing or sharing direct download links.
Key capabilities
- Share images, videos, documents, and other file types in messages
- Resumable uploads via TUS protocol for reliable large file transfers
- Webcam photo capture directly in the message composer
- File access protection through proxy serving (PHP, X-Sendfile, X-Accel-Redirect, LiteSpeed)
- Configurable maximum file size and number of files per message
- Whitelist of allowed file extensions
- Optional auto-deletion of attachments after a specified number of days
- Attachments browser tab in conversation details panel
- Option to hide uploaded files from the WordPress Media Library
How to enable
Navigate to WP Admin → Better Messages → Settings → Attachments.
- Enable File Sharing — Turn file attachments on or off
- Hide from Media Library — Prevent uploaded files from appearing in WordPress Media
- Attachments Browser — Show an attachments tab in conversation details
- File Proxy — Serve files through a proxy to protect direct URLs
- Proxy Method — Choose between PHP, X-Sendfile, X-Accel-Redirect, or LiteSpeed
- Upload Method — Standard POST or TUS resumable uploads
- Webcam Photo — Allow users to capture photos from their webcam
- Attachment Retention — Automatically delete attachments after N days (0 to disable)
- Max File Size — Maximum file size in megabytes
- Max Files Per Message — Maximum number of files that can be attached to a single message
- Allowed Formats — List of permitted file extensions