Merge pull request #3308 from camfindlay/patch-9

DOCS Setting allowed_extensions in YAML
This commit is contained in:
Damian Mooyman 2014-07-21 08:22:08 +12:00
commit 4ceadec123

View File

@ -146,6 +146,13 @@ to known file categories.
// 'doc','docx','txt','rtf','xls','xlsx','pages', 'ppt','pptx','pps','csv', 'html','htm','xhtml', 'xml','pdf'
$uploadField->setAllowedFileCategories('image', 'doc');
`AllowedExtensions` can also be set globally via the [YAML configuration](/topics/configuration#setting-configuration-via-yaml-files), for example you may add the following into your mysite/_config/config.yml:
:::yaml
File:
allowed_extensions:
- 7zip
- xzip
### Limit the maximum file size