Hi Alan,
Here’s an article on how to modify permitted file types by modifying your wp-config.php file.
Cheers,
Rob
Hi Rob,
Thank you for that I used the quick line define(‘ALLOW_UNFILTERED_UPLOADS’, true);
That solves the problem, but makes the website not secure
What I would like to do is use this
add_filter(‘upload_mimes’, ‘pixert_upload_types’);
function pixert_upload_types($existing_mimes=array()){
$existing_mimes[‘flv’] = ‘video/x-flv’;
$existing_mimes[‘mid’] = ‘audio/midi’;
return $existing_mimes;
}
But I am not sure what to put in for names it is .rcdx as an extension but the file is not audio or video , it is a database file for a radio.
What would you suggest please
All the best from Alan
Hi Alan,
The following should do it:
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {
$existing_mimes['rcdx'] = 'text/plain';
return $existing_mimes;
}
Here’s a link to the Upload Mimes Filter documentation on the Codex.
Cheers,
Rob
Good Afternoon Rob,
Excellent works a treat, thank you for that, bit more info to add to my black book 🙂
All the best from Alan
Excellent! Glad you came right.