Problem with windows wmv files having filetype video/x-ms-asf

Bug #1364609 reported by Robert Lyon on 2014-09-02
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon

Bug Description

Sometimes windows files that have the wmv (or wma) extension are being saved in the artefact_file_files table as mimetype video/x-ms-asf rather than video/x-ms-wmv (or audio/x-ms-wma).

This means you can't add them to a video (or audio) block.

Also for some reason, which I'm yet to work out, sites can have data where a wmv video with mimetype video/x-ms-asf is connected to an internalmedia block.

I'm not sure if they had the correct mimetype of video/x-ms-wmv in the past and somehow the mimetype changed or whether the mahara system allowed them to connect files with mimetype video/x-ms-asf.

But as there can be bad existing data on a site it needs to be fixed up pretty soon so that more bad data is created.

Looking at a myportfolio site there were 11,200 internal media blocks and 2,500 of them had a connection to a wmv file that had video/x-ms-asf as the mimetype (about 1/5th)

So it seems to be more than an isolated incidence.

Son Nguyen (ngson2000) wrote :

According to http://en.wikipedia.org/wiki/Advanced_Systems_Format, video/x-ms-asf is a correct mime type for both .wma and .wmv files

Robert Lyon (robertl-9) wrote :

Ok, so by the looks of things we need to allow that mimetype to be respected when we have allowed .wmv files to be attached to intermedia blocks.

So we have: Is block allowed to display .wmv file? Yes - then check if file's mimetype is video/x-ms-wmv or mimetype video/x-ms-asf (or possible check if it's in a pool of valid mimetypes)

Robert Lyon (robertl-9) on 2015-03-30
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
status: Confirmed → In Progress

Reviewed: https://reviews.mahara.org/4539
Committed: http://gitorious.org/mahara/mahara/commit/c7acae363df4b0410e18b1166a04e076c641fc17
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit c7acae363df4b0410e18b1166a04e076c641fc17
Author: Robert Lyon <email address hidden>
Date: Tue Mar 31 12:43:15 2015 +1300

Allowing video/x-ms-asf be a valid .wmv mimetype (Bug 1364609)

The video/x-ms-asf mimetype is valid for .asf, .wmv and .wma files
but as we can't map more than one extension to the same mimetype I've
added a little hack allowing the .wmv and .wma extensions to also
include the video/x-ms-asf mimtype in the list of valid mimetypes.

Change-Id: I706d86c9bc0c5d0c0eb6ab0a09b1f16208557b00
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/4547
Committed: http://gitorious.org/mahara/mahara/commit/710fefff17b82efd7126c59b7d094739cee7bfbc
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 710fefff17b82efd7126c59b7d094739cee7bfbc
Author: Robert Lyon <email address hidden>
Date: Tue Mar 31 12:43:15 2015 +1300

Allowing video/x-ms-asf be a valid .wmv mimetype (Bug 1364609)

The video/x-ms-asf mimetype is valid for .asf, .wmv and .wma files
but as we can't map more than one extension to the same mimetype I've
added a little hack allowing the .wmv and .wma extensions to also
include the video/x-ms-asf mimtype in the list of valid mimetypes.

Change-Id: I706d86c9bc0c5d0c0eb6ab0a09b1f16208557b00
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2015-04-16
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers