I've working on a post meta that I need to upload a .json file to a specific directory under wp-content. In my testing I see that I can upload PDF or image files, but not .json.
I've added a mime types filter - but the file is still not uploading.
add_filter( 'upload_mimes', 'my_myme_types', 1, 1 );
function my_myme_types( $mime_types ) {
$mime_types['json'] = 'application/json'; // Adding .json extension
return $mime_types;
}
Thank you.