Home › Forums › Bug Reports › ACF Allowed File Types vCard Bug › Reply To: ACF Allowed File Types vCard Bug
Hi @johnnydugs,
Thank you for bringing this issue to our attention. This is currently a limitation of the ACF upload field but you can add the vCard support through the following code:
/*
Add V card support
_______________________________________________
*/
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;
}
The above code should go to your functions.php file. You can then add the following code to your htaccess file:
AddType application/octet-stream vcf
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.