WordPress: Sorry, this file type is not permitted for security reasons.

Add the following code snippet to functions.php. Change ‘filetype’ to the file type that is not permitted for security reasons

add_filter('upload_mimes', 'custom_upload_mimes');

function custom_upload_mimes ( $existing_mimes=array() ) {

	// add the file extension to the array

	$existing_mimes['filetype'] = 'mime/type';

        // call the modified list of extensions

	return $existing_mimes;

}
%d bloggers like this: