- This topic has 1 reply, 2 voices, and was last updated 8 months, 2 weeks ago by .
-
Topic
-
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.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.