mzboril
mzboril

Hi, I'm working on plugin and I need to enable support for uploading tiff files in backend. Do you have any experiences with that? I'll be glad for every idea.

ndcisiv
ndcisiv

You could add it to your configuration options. Take a look here, specifically the imageExtensions parameter. https://octobercms.com/docs/cms/mediamanager#configuration-options

mzboril
mzboril

I tried added some other files formats and that was working but if I added extension for tiff file format it doesn't work. Do you have any suggestions where is problem?

ndcisiv
ndcisiv

After looking some more, it appears you can just include an array at the bottom of your cms.php config file.


'fileDefinitions' => [
        'defaultExtensions' => [
            'jpg',
            'jpeg',
            'bmp',
            'png',
            'gif',
            'svg',
            'js',
            'map',
            'ico',
            'css',
            'less',
            'scss',
            'pdf',
            'swf',
            'txt',
            'xml',
            'xls',
            'eot',
            'woff',
            'woff2',
            'ttf',
            'flv',
            'wmv',
            'mp3',
            'ogg',
            'wav',
            'avi',
            'mov',
            'mp4',
            'mpeg',
            'webm',
            'mkv',
            'rar',
            'zip',
            'tif',
            'tiff',
        ]
    ]
mzboril
mzboril

I tried it and it works, thanks you very much. I found also another way and that is adding the additional files formats into Definitions.php which is in the \vendor\october\rain\src\Filesystem. There is a method defaultExtensions() with array of files formats.

1-5 of 5