Hello, my client would like me to add his vcf to the website but it wont’s allow me to upload due to security reasons. I can see that there is a way to do it by adding this code to the functions sections
add_filter(‘upload_mimes’, ‘custom_upload_mimes’);
function custom_upload_mimes ( $existing_mimes=array() ){
// add your extension to the array
$existing_mimes[‘vcf’] = ‘text/x-vcard’; return $existing_mimes;
}
however I am very unsure as to how to do that – could you please give me some guidance on this please?
Hey bauchope,
I added the code (see below) to your functions.php (at the very bottom, a link to the file can be found in the private content field below)
add_filter('upload_mimes', 'avia_add_vcf_mime');
function avia_add_vcf_mime( $kb_all_mimes=array() )
{
$kb_all_mimes['vcf'] = 'text/x-vcard';
return $kb_all_mimes;
}
Best regards,
Peter
thanks very much Dude. It worked a treat
You can mark this as resolved
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon