Opened 17 years ago
Closed 16 years ago
#10052 closed defect (bug) (fixed)
Missing mime types
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.9 | Priority: | normal |
| Severity: | minor | Version: | 2.8 |
| Component: | Media | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
Seems flv is not in the mime type list. They get treated as apps, but should really be treated as video/x-flv. Patch attached.
Attachments (1)
Change History (5)
#2
@
17 years ago
- Milestone changed from 2.8 to 2.9
Think there were some problems/limitations with some media players certain mime types.
#3
@
17 years ago
- Keywords needs-patch added; has-patch commit removed
FWIW, I use the following two filters in a media-related plugin of mine:
/**
* upload_mimes()
*
* @param array $mines
* @return array $mines
**/
function upload_mimes($mimes) {
if ( !isset($mimes['flv|f4b|f4p|f4v']) )
$mimes['flv|f4b|f4p|f4v'] = 'video/x-flv';
if ( !isset($mimes['aac']) )
$mimes['aac'] = 'audio/aac';
if ( !isset($mimes['3gp|3g2']) )
$mimes['3gp|3g2'] = 'video/3gpp';
return $mimes;
} # upload_mimes()
/**
* ext2type()
*
* @param array $types
* @return array $types
**/
function ext2type($types) {
$types['video'] = array_merge($types['video'], array('flv', 'f4b', 'f4p', 'f4v', '3pg', '3g2'));
return $types;
} # ext2type()
Note: See
TracTickets for help on using
tickets.
A few more here, for aac formats:
http://en.wikipedia.org/wiki/Advanced_Audio_Coding