Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
file.mimetypes does not have an entry for video/x-m4v m4v which prevents these video files' mime type from being properly detected.
Attached patch adds this entry to our listing.
Comment | File | Size | Author |
---|---|---|---|
mimetype.patch | 613 bytes | arthurf | |
Comments
Comment #1
Dave ReidThis directly matches the information at http://en.wikipedia.org/wiki/M4V.
Comment #2
Dave ReidRTBC pending testbot review
Comment #3
Dave ReidComment #4
Devin Carlson CreditAttribution: Devin Carlson commentedI just stumbled upon this issue while reviewing some of the great work being done on the media module; it looks like the version was set to 7.x-dev by mistake?
I'm moving this to 8.x and changing the status to needs review. I'll change it back to RTBC after the testbot runs.
I conditionally apologize if I'm wrong about this!
Comment #5
Devin Carlson CreditAttribution: Devin Carlson commentedmimetype.patch queued for re-testing.
Comment #6
Devin Carlson CreditAttribution: Devin Carlson commentedComment #7
Dave ReidConfirming this is ready against both 8.x and 7.x.
Comment #8
catchCommitted to 8.x, moving to 7.x for webchick to look at.
Comment #9
webchickCommitted and pushed to 7.x. Thanks!
Though one question. Is it possible a contributed module has already used ID 348 for something else..?
Comment #10
Dave ReidThey should be adding their entries properly. If not, then it's a bug in that module:
Comment #11
webchickRight, I understand that. But
$mapping['mimetypes'][] = $mime_type;
in an array$mapping['mimetypes']
with 348 items already in it would give you an ID of 348... no? Or does it not matter, since the code always refers to$mapping['extensions'][$extension]
instead?Comment #12
Dave ReidNo, the id of $mime_type in this case would be 349. The key is using it properly.
Comment #13
arthurf CreditAttribution: arthurf commentedWebchick- from your question in #9, I'm guessing that we could have a function which does basically what file_entity_file_mimetype_mapping_alter() is doing so that modules implementing the alter hook do not risk hard coding the keys. Possibly an extension/mimetype register hook.
More simply we could modify the text of http://api.drupal.org/api/drupal/modules--system--system.api.php/functio... to give a better example of how to implement this hook without creating collisions.