Skip to content
Snippets Groups Projects
Commit b2e4d8f0 authored by ale's avatar ale
Browse files

Allow upload of epub files via mime-type fix

parent f84a4162
Branches
Tags v0.4.14
No related merge requests found
Checking pipeline status
......@@ -27,3 +27,16 @@ add_filter( 'wp_check_filetype_and_ext', function( $types, $file, $filename, $mi
}
return $types;
}, 1, 5);
/* Allow upload of other MIME types.
*
* These are easier as there's no possibility of misidentification.
*/
function ai_mu_edit_upload_types($existing_mimes = array()) {
// allow .epub
$existing_mimes['epub'] = 'application/epub+zip';
return $existing_mimes;
}
add_filter('upload_mimes', 'ai_mu_edit_upload_types');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment