Can’t upload .json file

If .json file not loading to media library add this code to Appearance > Editor > function.php:

function my_myme_types($mime_types){
$mime_types[‘json’] = ‘application/json'; //Adding json extension
return $mime_types;
}
add_filter(‘upload_mimes’, ‘my_myme_types’, 1, 1);

Leave A Comment?