You have 3 possibilities:
Add the following to your wp-config.php
define('ALLOW_UNFILTERED_UPLOADS', true);
This would actually allow all file types. Please note that this could be a potential risk for your server and your visitors as you would have no control over what is uploaded there.
Or add the file types you want in the functions.php or a plugin you wrote yourself:
add_filter( 'upload_mimes', 'my_myme_types', 1, 1 );
function my_myme_types( $mime_types ) {
$mime_types['svg'] = 'image/svg+xml'; // Adding .svg extension
return $mime_types;
}
Or use a plugin where you can select and specify in wp-admin which file types should be allowed: https://ww.wp.xz.cn/plugins/file-upload-types/
Thread Starter
nictfk
(@nictfk)
The first option of modifying wp-config didn’t work, I’ll look into it though, probably an error on my end.
I tried the plugin you suggested too before, the thing is, some of the file types my vendors want to upload are not listed there, and simply adding in the code for those also didn’t work (once again I do it incorrectly probably)
But anyways, thanks for the help, if there isn’t anything else you can suggest me in this case, I’ll mark this topic as resolved.
If you have problems with this plugin please ask their developers in their support-forum: https://ww.wp.xz.cn/support/plugin/file-upload-types/ – I use it on some projects without any problems.