<p>It's not "restrictable", because you just added it. Why would you then go back and restrict it?</p>

<p>Using <code>extraAllowedFileExtensions</code> doesn't change the checkbox list at all. It simply allows you to upload files <em>in addition</em> to what is available on that list.</p>

CC BY-SA 3.0
2017-07-07T21:00:25.547Z
Gotcha, but what if you actually wanted to restrict to that single file type? So that a field can't be populated by other filetypes. Because if I then restrict to something like `Access` it won't let me upload the added file extension to that field, just `Access` files...
Anders
CC BY-SA 3.0
2017-07-07T21:01:25.283Z
Two semi-related feature requests: https://github.com/craftcms/cms/issues/1584 and https://github.com/craftcms/cms/issues/1511
Brad Bell
CC BY-SA 3.0
2017-07-07T21:02:08.710Z
Was just about to say, "sounds like a feature request" ;)
Lindsey D
CC BY-SA 3.0
2018-04-29T14:49:17.013Z
My wish: `'extraAllowedFileExtensions' => [ 'css': 'Stylesheet', 'hl3': 'Half-Life 3' ]`. Then there could be the checkboxes added to the "Restrict by type" part according to the name provided.
Sandwich
CC BY-SA 3.0
2017-07-07T20:45:19.977Z
2017-07-07T20:45:19.977Z
Lindsey D
<p>When adding <code>'extraAllowedFileExtensions' =&gt; 'css'</code> to <code>/craft/config/general.php</code> it doesn't show up in the list below <code>Restrict allowed file types?</code>. Am I missing something? Is it just not "restrictable" to an added filetype?</p>

<templating><assets><field>
Additions to extraAllowedFileExtensions not showing up in the checkbox list
# Additions to extraAllowedFileExtensions not showing up in the checkbox list

(Asked by: username_0 on 2017-07-07)

When adding `'extraAllowedFileExtensions' => 'css'` to `/craft/config/general.php` it doesn't show up in the list below `Restrict allowed file types?`. Am I missing something? Is it just not "restrictable" to an added filetype?

**Tags:** templating, assets, field

---

## 1 answers

### Answer by username_1 on 2017-07-07. Score: 1

It's not "restrictable", because you just added it. Why would you then go back and restrict it?

Using `extraAllowedFileExtensions` doesn't change the checkbox list at all. It simply allows you to upload files *in addition* to what is available on that list.

> **Comments:**
> **username_0**: Gotcha, but what if you actually wanted to restrict to that single file type? So that a field can't be populated by other filetypes. Because if I then restrict to something like `Access` it won't let me upload the added file extension to that field, just `Access` files...  
> **username_2**: Two semi-related feature requests: https://github.com/craftcms/cms/issues/1584 and https://github.com/craftcms/cms/issues/1511  
> **username_1**: Was just about to say, "sounds like a feature request" ;)  
> **username_3**: My wish: `'extraAllowedFileExtensions' => [ 'css': 'Stylesheet', 'hl3': 'Half-Life 3' ]`. Then there could be the checkboxes added to the "Restrict by type" part according to the name provided.  

---

