1

When I upload .otf file in October CMS it pops up an error as below:

Error uploading file 'FontAwesome.otf': Only the following file types are allowed: jpg, jpeg, bmp, png, webp, gif, ico, css, js, woff, woff2, svg, ttf, eot, json, md, less, sass, scss

And also I can't upload .map file too.

Midhun Babu
  • 119
  • 1
  • 10

2 Answers2

1

Yes you need to add that extensions to the config, after that October cms will allow you to upload files :

Please refer this answer : October CMS disallowed file types

just add this lines to the config/cms.php config and it should work.

<?php

return [

    'fileDefinitions' => [
        'defaultExtensions' => [
            'otf','map' ... other extensions
         ]
    ],

    // other config
    ....
];
Hardik Satasiya
  • 9,547
  • 3
  • 22
  • 40
0

In case anyone is having the same issue in uploading assets, they are defined separately. You can check the following config for reference :

    'fileDefinitions' => [
            'imageExtensions' => ['jpg','jpeg','bmp','png','webp','gif','ico','svg'],
            'defaultExtensions' => ['jpg','jpeg','bmp','png','webp','gif','ico','css','js','woff','woff2', 'ttf','eot','json','md','less','sass','scss','xml','svg'],
            'assetExtensions' => ['jpg','jpeg','bmp','png','webp','gif','ico','css','js','woff','woff2','ttf','eot','json','md','less','sass','scss','xml','svg']
]    
s1d
  • 519
  • 4
  • 13