Howdy folks!
I am currently running ACF Pro v5.2.5 and am experiencing an issue with a file upload field. It appears the field is not able to recognize vcf
as a file type. The purpose of the field is to allow users to upload a vCard that get’s attached to posts within the employee custom post type. Please see screenshots.
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