문제

I want to upload jar in my Wordpress website. But it seems that Wordpress does not allow to upload this type of file. I am using Wordpress 3.8.2. Any help and suggestion is greatly appreciated.

도움이 되었습니까?

해결책

If you don't want to get your hands dirty and want to keep easy access to these settings, install a plugin that enables you to do this. For instance this plugin works well for me: https://wordpress.org/plugins/wp-add-mime-types/

enter image description here

다른 팁

Rather than editing core files (which is always a bad idea), you should consider adding a filter by hooking into the mime_types filter:

/**
 * Add JAR file type to list of allowed extensions 
 * 
 * @param array $types Default allowed mime types
 */
function so23113552_custom_mime_types( $types ) {

    $types['jar'] = 'application/java-jar';

    return $types;
}
add_filter( 'mime_types', 'so23113552_custom_mime_types' );
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top