Skip to content

Policy Recipes: Files Tab ​

Task-oriented Files tab recipes you can copy/paste. These recipes control how files appear and which operations are allowed in the Files tab.

What You'll Learn

  • How to define reusable fileTypes for risk categories
  • How to block or hide specific file types in the Files tab
  • How to separate list and import behavior using file policies

Files Tab Recipes ​

These recipes configure fileTypes and files policies for the Files tab.

Block Importing Executables ​

Deny importing risky file types using a shared fileTypes registry entry.

json
{
  "fileTypes": [
    {
      "id": "executable",
      "displayName": "Executables",
      "match": { "extensions": ["exe","dll","msi","bat","cmd","ps1"] }
    }
  ],
  "files": [
    {
      "id": "deny-import-executables",
      "displayName": "Block importing executables",
      "enabled": true,
      "priority": 1000,
      "operation": "import",
      "fileTypeRef": "executable",
      "action": "deny"
    }
  ]
}

Validate:

  • Attempting to import any file that resolves to the executable fileType is denied.
  • The user sees an informative message explaining that executable imports are blocked.

Hide Temporary/Backup Files From Listing ​

Hide temporary and backup file types from appearing in the Files tab listing.

json
{
  "fileTypes": [
    {
      "id": "temp-and-backups",
      "displayName": "Temporary/backup files",
      "match": { "extensions": ["tmp","bak","log"] }
    }
  ],
  "files": [
    {
      "id": "hide-temp-and-backups",
      "displayName": "Hide temporary/backup files",
      "enabled": true,
      "priority": 900,
      "operation": "list",
      "fileTypeRef": "temp-and-backups",
      "action": "deny"
    }
  ]
}

Validate:

  • Matching .tmp, .bak, and .log files do not appear in the Files tab.
  • Other file types still appear and behave as expected.

Quick Authoring Checklist (Files Tab) ​

  • Define fileTypes once for each risk or category you want to manage (for example, executable, temp-and-backups).
  • Use files[].operation to control specific operations:
    • list for visibility.
    • import / export for movement into or out of the Files tab.
    • open / delete where applicable.
  • Use priority to ensure stricter policies (for example, deny rules for risky types) win over more general entries.

See also: