Add support for rar and 7x file uploading. Fixes #16412 props Caspie.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2011-09-22 08:29:35 +00:00
parent f2a6d07a9d
commit 19f46502c0
1 changed files with 3 additions and 1 deletions

View File

@ -2432,7 +2432,7 @@ function wp_ext2type( $ext ) {
'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsb', 'xlsm' ),
'interactive' => array( 'key', 'ppt', 'pptx', 'pptm', 'odp', 'swf' ),
'text' => array( 'asc', 'csv', 'tsv', 'txt' ),
'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip' ),
'archive' => array( 'bz2', 'cab', 'dmg', 'gz', 'rar', 'sea', 'sit', 'sqx', 'tar', 'tgz', 'zip', '7z' ),
'code' => array( 'css', 'htm', 'html', 'php', 'js' ),
));
foreach ( $ext2type as $type => $exts )
@ -2598,6 +2598,8 @@ function get_allowed_mime_types() {
'tar' => 'application/x-tar',
'zip' => 'application/zip',
'gz|gzip' => 'application/x-gzip',
'rar' => 'application/rar',
'7z' => 'application/x-7z-compressed',
'exe' => 'application/x-msdownload',
// openoffice formats
'odt' => 'application/vnd.oasis.opendocument.text',