Mime types yang didukung WordPress untuk sementara ini hanyalah tipe file gambar dan dokumen, untuk tipe-tipe lain fasilitas menambahkan tipe file baru pada saat mengupload file baru memang hanya tersedia saat WordPress disulap menjadi multiuser. Untuk itulah kita harus menambahkan sendiri tipe file tersebut, baik dengan plugin atau script langsung.
Untuk menambahkan dengan script berikut:
function wpbpm_myme_types($mime_types){
//Creating a new array will reset the allowed filetypes
$mime_types = array(
'jpg|jpeg|jpe' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
'bmp' => 'image/bmp',
'tif|tiff' => 'image/tiff',
'rar' => 'application/x-rar-compressed' //tambahan baru
);
return $mime_types;
}
add_filter('upload_mimes', 'wpbpm_myme_types', 1, 1);
Adapun daftar lengkap tipe file, ekstensi dan mimetypenya silakan kunjungi: http://www.webmaster-toolkit.com/mime-types.shtml.
Selamat mencoba!
Incoming search terms:
- tipe - tipe file
- TIPE FILE
- tipe-tipe file
- Tipe tipe file
- tutorial mime type function
- tipejenis file untuk dvd
- tipe file mime
- tipe file gambar
- bagaimana cara upload image file bmp pada blog wordpress
- tipe data gambar pada web

No Comments on “Belajar WordPress: Menambahkan Mime Types (Tipe File) Baru”
You can track this conversation through its atom feed.