Attachment Upload Guard
by Farhan Ashraf https://apps.odoo.com/apps/modules/browse?author=Farhan+AshrafAttachment Upload Guard
Risky files never reach your database.
Odoo lets anyone attach anything, of any size — executables, scripts and half-gigabyte videos land in your database and every backup you take. This module adds the upload policy Odoo does not ship: a blocked file-type list and a maximum size, enforced wherever users attach files, including the chatter and Discuss. Free and open source (LGPL-3), Odoo 14.0 through 19.0.
- Covers the real upload paths — chatter, Discuss and form attachments, not just direct RPC.
- No back doors — renaming a file or swapping its contents afterwards is checked too.
- Never breaks Odoo — reports, web assets, imports and scheduled jobs are always allowed.
- Clear message — users are told which type is blocked, or how large the file may be.
Screenshots
Settings → General Settings → Attachments: choose the blocked file types and the maximum size. Reports, assets and imports are never affected.
Installation
- Open Apps, search for Attachment Upload Guard and click Install.
- Only standard
base_setupis required. Sensible defaults apply immediately.
Configuration
- Go to Settings → General Settings and find the Attachments block.
- Adjust Blocked File Types (comma-separated, e.g.
exe,bat,msi) — leave empty to allow every type. - Set Maximum Size (MB), or 0 for no size limit, then Save.
Usage
- A user attaching a blocked or oversized file gets a clear error and the upload is refused.
- Existing attachments are untouched; the policy applies to new uploads and to later edits.
- To allow a one-off upload, temporarily adjust the policy in Settings.
Version notes
Identical behavior on every supported series (14.0 – 19.0).
Questions, bugs or feature requests?
Email f.ashraf.dev1@gmail.com — I read and answer every message.
License: LGPL-3 · Source on GitHub · Issues and contributions welcome.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 152 |
| Technical Name |
attachment_upload_guard |
| License | LGPL-3 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Farhan+Ashraf |
Please log in to comment on this module