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
- Maximum file size (MB) — set in a dedicated field at the top of the page (for example,
25). - File types table — the main way to manage rules: each row has Allowed, Extension, Title, and MIME types. Add or edit rows via Add file type / the row actions.
- JSON (optional) — expand the JSON block to view or edit the same configuration as text; changes in the editor are reflected in the table above immediately.
- Telegram stickers in the Operator Panel — static stickers are often
.webp. Animated stickers use.tgs. Animated.tgsmessages play as a sticker in the dialog when the file is accepted.
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. Set maximum size
- In Maximum file size (MB), enter the limit as a whole number (minimum 1).
3. Manage allowed file types
- Review rows in the file types table (Allowed, Extension, Title, MIME).
- To add a type, click Add file type and fill in the dialog:
- Allowed — whether this type is accepted;
- Extension — without a dot (for example,
pdf); - Title — label for administrators;
- MIME types — comma-separated (hint on the form, for example
application/pdf, image/jpeg).
- Click Save in the dialog. If the extension already exists, you will see A file type with this extension already exists — change the extension or edit the existing row.
- Use edit or delete actions in a row to change or remove a type.
- (Optional) Expand JSON to edit the configuration as text — it stays in sync with the table.
4. Telegram stickers (if missing)
Add the rows in the table (or entries in JSON). Note: .tgs files are small by design, but your global size limit still applies.
| Use case | Extension | Example MIME types |
|---|---|---|
| Static sticker (WebP) | webp | image/webp |
| Animated sticker (TGS) | tgs | application/octet-stream (add others if your storage sends a different Content-Type) |
Example JSON fragment (merge with your existing configuration):
{
"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
}
5. 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
tgsallowed — the operator should see the animation in the dialog.