Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#10052 closed defect (bug) (fixed)

Missing mime types

Reported by: denis-de-bernardy's profile Denis-de-Bernardy 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)

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 changed from Missing mime type to Missing mime types

A few more here, for aac formats:

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

#2 @azaozz
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 @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
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.