How to Configure File Parameters?
Configuring files sets limits for uploads to the system: maximum size and allowed file types (by extension and MIME type). The same rules affect which incoming files (for example from Telegram) are accepted before they appear in the Operator Panel.
When You'll Need This
- You need to set the maximum file size that can be uploaded to the system.
- You need to limit file types (for example, only images or documents).
- Clients send Telegram stickers (static
.webpor animated.tgs) and operators should see them in the chat thread — you must allow the right extensions and MIME types.
What's Important to Know
- JSON shape — settings are an object with
files(an array of rules) andmax_file_size_mb(maximum size in megabytes). - Each item in
filesdescribes one allowed type: a label (title), extension without a dot (extension), allowed MIME types (mime_typesarray), and whether it is allowed (allow:true/false). - Maximum file size — a number in MB (for example,
25). - Telegram stickers in the Operator Panel — static stickers are often
.webp(normal image). Animated stickers use.tgs. Animated.tgsmessages are shown as a playing sticker in the dialog (not only as a file link), provided the file was accepted and the link is reachable. If the type is not allowed in settings, the file may be rejected before it reaches the operator.
Before You Start
You are logged in with administrator or supervisor rights. You have permission to save operator panel settings.
Step-by-Step Instructions
1. Open File Settings
- Go to the Settings module through the menu or directly at
/settings-page. - In the side menu, find the "Settings" section (operator panel subsection) and expand it.
- Click "Working with files" (
/settings-page/op-settings/files).
2. Edit the JSON configuration
- Open the JSON editor on the page.
- In the
filesarray, add or edit objects withtitle,extension,mime_types, andallow. - Set
max_file_size_mb(integer, megabytes). Note: Telegram animated stickers (.tgs) are small by design, but your global size limit still applies.
3. Telegram stickers — what to add to files (if missing)
| Use case | extension | Example mime_types (use values your storage / browser actually sends) |
|---|---|---|
| Static sticker (WebP image) | webp | ["image/webp"] |
| Animated sticker (Telegram TGS) | tgs | ["application/octet-stream"] — most common for binary .tgs; add other types if uploads or storage use a different Content-Type |
Example snippet allowing WebP and TGS (keep your existing files entries and merge as needed):
{
"files": [
{
"title": "WebP image",
"extension": "webp",
"mime_types": ["image/webp"],
"allow": true
},
{
"title": "Telegram animated sticker (TGS)",
"extension": "tgs",
"mime_types": ["application/octet-stream"],
"allow": true
}
],
"max_file_size_mb": 25
}
4. Save settings
- Verify all changes.
- Click "Save" at the top of the page.
- Wait for the success message.
What Happens Next
Limitations apply to all operators:
- Uploading a file over the maximum size shows an error.
- Uploading a disallowed type shows an error.
- Incoming files (including from channels such as Telegram) are checked against allowed extensions (and MIME rules where applicable for uploads).
How to Verify Everything Worked
- Try an oversized file — you should see an error.
- Try a disallowed type — you should see an error.
- Send a Telegram animated sticker with
tgsandapplication/octet-streamallowed — the operator should see the animation in the dialog.