Pregunta

I have some '.mht' files. I need to upload that file in to my word press site. but when i upload that files, its showing "HTTP ERROR" Error.

Is there any other way to upload '.mht' files to word press site.

¿Fue útil?

Solución

You can Upload Additional File Types To Your WordPress Blog using the below code here.

 <?php
 add_filter('upload_mimes', 'custom_upload_mimes');
 function custom_upload_mimes ( $existing_mimes = array() ) {
 // add your extension to the array
 $existing_mimes['ppt'] = 'application/vnd.ms-powerpoint';
 // or: $existing_mimes['ppt|pot|pps'] = 'application/vnd.ms-powerpoint';
 // to add multiple extensions for the same mime type
 // add as many as you like
 // removing existing file types
 unset( $existing_mimes['exe'] );
 // add as many as you like
 // and return the new full result
 return $existing_mimes;
 }
 ?>

So you can add your file formats in this way by using the above code
For more info Regarding this issue visit this link..
Default file formats that supports for word press is here..

Otros consejos

add this in your function.php

function custom_upload_mimes ( $existing_mimes=array() ) {

    $existing_mimes['mht'] = 'multipart/related';

    return $existing_mimes;

}
add_filter('upload_mimes', 'custom_upload_mimes');
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top