forked from simogeo/Filemanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Set up upload restriction on file type
pavel edited this page Mar 16, 2016
·
7 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",
...
]
- 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.
- 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.