Change permitted file types

Replies
0
Voices
1
Freshness
Followers

0

In the Pro version, it’s possible to allow users to upload an image as the featured image for the topic. By default, only png and jpg file types are permitted. However, you can change this with a filter, e.g.:

function me_change_mime_types( $existing_mimes ) {
// Add gif as permitted mime type
$existing_mimes['gif'] = 'image/gif';
return $existing_mimes;
}
add_filter( 'ctdb_existing_mimes', 'me_change_mime_types' );

Use with care to avoid users uploading potentially malicious files.