WordPress Can Not Upload Office Or Open Office Document files

When I upload a .odt file, I got error message appear: Sorry, for security reasons, this kind of file is not allowed.

You can add following code to wp-config.php, this constant all all file types to be uploaded to WordPress

define('ALLOW_UNFILTERED_UPLOADS', true);

Also you could use following function to allow specific file types

add_filter('upload_mimes', 'extra_upload_types');
function extra_upload_types($existing_mimes=array()){
    $existing_mimes['flv'] = 'video/x-flv';
    return $existing_mimes;
}
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments