public static function getAllowedExtensions()
    {
        $config = static::config()->get('allowed_extensions');

        $allowedExtensions = [];
        foreach ($config as $key => $value) {
            if (is_int($key)) {
                // Numeric indexes, example: [jpg, png, gif]
                $key = $value;
                $value = true;
            }

            // Skip disabled extensions
            if (in_array($value, [null, false], true)) {
                continue;
            }

            $allowedExtensions[] = strtolower($key);
        }
        return $allowedExtensions;
    }
public static function getAllowedExtensions()
    {
        $config = static::config()->get('allowed_extensions');

        $allowedExtensions = [];
        foreach ($config as $key => $value) {
            if (is_int($key)) {
                // Numeric indexes, example: [jpg, png, gif]
                $key = $value;
                $value = true;
            }

            // Skip disabled extensions
            if (in_array($value, [null, false], true)) {
                continue;
            }

            $allowedExtensions[] = strtolower($key);
        }
        return $allowedExtensions;
    }
public static function getAllowedExtensions ( ) { $ config = static :: config ( ) -> get ( 'allowed_extensions' ) ; $ allowedExtensions = [ ] ; foreach ( $ config as $ key => $ value ) { if ( is_int ( $ key ) ) { // Numeric indexes, example: [jpg, png, gif] $ key = $ value ; $ value = true ; } // Skip disabled extensions if ( in_array ( $ value , [ null , false ] , true ) ) { continue ; } $ allowedExtensions [ ] = strtolower ( $ key ) ; } return $ allowedExtensions ; }
Get the list of globally allowed file extensions for file uploads.

Specific extensions can be disabled with configuration, for example:

```
SilverStripe\Assets\File:
allowed_extensions:
dmg: false
docx: false
```

@return array
Get the list of globally allowed file extensions for file uploads .