I upload an ogg file in media browser.
What I find in the file_managed table that the ogg file has been marked as type "application", not "audio". is there anything have to do with the MIME type of ogg file: application/ogg?

So you cannot choose it from media browser any more since it's not "audio", even not "other".

Comments

dave reid’s picture

Project: D7 Media » File Entity (fieldable files)
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Media Browser » Code

Hrm, take a look at http://api.drupal.org/api/drupal/includes--file.mimetypes.inc/function/f... - the 'ogg' file extension is default mapped to 'application/ogg'.

The real problem is that both audio and video ogg files can be both .ogg files and there really isn't a standard to differentiate them. I guess we could maybe update that default mapping to map '.ogg' to audio/ogg since '.ogv' is mapped to 'video/ogg'.

dave reid’s picture

Ah now I see this on http://en.wikipedia.org/wiki/Ogg

Before 2007, the .ogg filename extension was used for all files whose content used the Ogg container format. Since 2007, the Xiph.Org Foundation recommends that .ogg only be used for Ogg Vorbis audio files. The Xiph.Org Foundation decided to create a new set of file extensions and media types to describe different types of content such as .oga for audio only files, .ogv for video with or without sound (including Theora), and .ogx for multiplexed Ogg.

We should file a core patch to correct this and also fix this in File entity in the meantime.

dave reid’s picture

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new1.9 KB

Please test the following patch for file_entity 7.x-1.x.

Status: Needs review » Needs work

The last submitted patch, 1239064-fix-ogg-mimetype-mapping.patch, failed testing.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new2.11 KB

Status: Needs review » Needs work

The last submitted patch, 1239064-fix-ogg-mimetype-mapping.patch, failed testing.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new2.11 KB

Status: Needs review » Needs work

The last submitted patch, 1239064-fix-ogg-mimetype-mapping.patch, failed testing.

dave reid’s picture

StatusFileSize
new3.27 KB
dave reid’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1239064-fix-ogg-mimetype-mapping.patch, failed testing.

dave reid’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1239064-fix-ogg-mimetype-mapping.patch, failed testing.

dave reid’s picture

Status: Needs work » Fixed

Committed #10 to Git. We have to just live with test failures for now.
http://drupalcode.org/project/file_entity.git/commit/9eba2c6

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.