mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS Document that you can set the global allow extensions via YAML.
Fixes #3233
This commit is contained in:
parent
ef03dfdd5b
commit
1fee81acef
@ -146,6 +146,14 @@ to known file categories.
|
|||||||
// 'doc','docx','txt','rtf','xls','xlsx','pages', 'ppt','pptx','pps','csv','pdf'
|
// 'doc','docx','txt','rtf','xls','xlsx','pages', 'ppt','pptx','pps','csv','pdf'
|
||||||
$uploadField->setAllowedFileCategories('image', 'doc');
|
$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
|
||||||
|
|
||||||
<div class="notice" markdown='1'>
|
<div class="notice" markdown='1'>
|
||||||
Note: File types such as SWF, XML and HTML are excluded by default from uploading as these types are common
|
Note: File types such as SWF, XML and HTML are excluded by default from uploading as these types are common
|
||||||
security attack risks. If necessary, these types may be allowed as uploads (at your own risk) by adding each
|
security attack risks. If necessary, these types may be allowed as uploads (at your own risk) by adding each
|
||||||
|
Loading…
Reference in New Issue
Block a user