Skip to content

Set up upload restriction on file type

pavel edited this page May 18, 2016 · 8 revisions

There is 2 ways to restrict upload regarding file extension with a logic similar to Apache access control.

By default, allowed extensions are listed as an array into uploadRestrictions variable.

In "scripts/filemanager.config.json" find the Security policy section and edit config variables :

        "uploadPolicy": "DISALLOW_ALL",
        "uploadRestrictions": [
            "jpg",
            "jpe",
            "jpeg",
            ...
        ]
  1. Setting uploadPolicy with DISALLOW_ALL value means, by default the filemanager won't accept any uploads except for files having extensions mentioned into uploadRestrictions array.
  2. Setting uploadPolicy with ALLOW_ALL value means, by default the filemanager will accept any type of files for upload except for files having extensions mentioned into uploadRestrictions array.