Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#10052 closed defect (bug) (fixed)

Missing mime types

Reported by: Denis-de-Bernardy Owned by:
Priority: normal Milestone: 2.9
Component: Media Version: 2.8
Severity: minor Keywords: needs-patch
Cc: Focuses:

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)

10052.diff​ (467 bytes ) - added by Denis-de-Bernardy 17 years ago.

Download all attachments as: .zip

Change History (5)

#1 @Denis-de-Bernardy
17 years ago

  • Summary Missing mime type → Missing mime types

A few more here, for aac formats:

​http://en.wikipedia.org/wiki/Advanced_Audio_Coding

#2 @azaozz
17 years ago

  • Milestone 2.8 → 2.9

Think there were some problems/limitations with some media players certain mime types.

#3 @Denis-de-Bernardy
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()

#4 @azaozz
17 years ago

  • Resolution → fixed
  • Status new → closed
Note: See TracTickets for help on using tickets.