#17 extension-mimetype mappings are case insensitive

Next Release
closed
Jin
6
2008-03-02
2007-08-10
No

Mappings in the config file between file extensions and mime types are not currently case insensitive. Requiring me to do the following in order to pick up files that have upper case extensions:

<extension-mimetype ignore-unknown="yes">
<map from="aac" to="audio/mp4"/>
<map from="m4a" to="audio/mp4"/>
<map from="mp3" to="audio/mpeg"/>
<map from="m3u" to="audio/x-mpegurl"/>
<map from="pls" to="audio/x-scpls"/>
<map from="wav" to="audio/x-wav"/>

<map from="mp4" to="video/mp4"/>
<map from="m4v" to="video/mp4"/>
<map from="h264" to="video/mpeg"/>
<map from="mpeg" to="video/mpeg"/>
<map from="mpg" to="video/mpeg"/>
<map from="ts" to="video/mpeg"/>
<map from="vob" to="video/mpeg"/>
<map from="mp2" to="video/mpeg2"/>

<map from="bmp" to="image/bmp"/>
<map from="gif" to="image/gif"/>
<map from="jpeg" to="image/jpeg"/>
<map from="jpg" to="image/jpeg"/>

<map from="AAC" to="audio/mp4"/>
<map from="M4A" to="audio/mp4"/>
<map from="MP3" to="audio/mpeg"/>
<map from="M3U" to="audio/x-mpegurl"/>
<map from="PLS" to="audio/x-scpls"/>
<map from="WAV" to="audio/x-wav"/>

<map from="MP4" to="video/mp4"/>
<map from="M4V" to="video/mp4"/>
<map from="H264" to="video/mpeg"/>
<map from="MPEG" to="video/mpeg"/>
<map from="MPG" to="video/mpeg"/>
<map from="TS" to="video/mpeg"/>
<map from="VOB" to="video/mpeg"/>
<map from="MP2" to="video/mpeg2"/>

<map from="BMP" to="image/bmp"/>
<map from="GIF" to="image/gif"/>
<map from="JPEG" to="image/jpeg"/>
<map from="JPG" to="image/jpeg"/>
</extension-mimetype>

This would be worthwhile fixing.

Discussion

  • Jin

    Jin - 2007-08-10

    Logged In: YES
    user_id=1205152
    Originator: NO

    Yes, I know... this is somewhat stupid. I could make a quick fix which would only work for non UTF-8 strings, but for correct UTF-8 support much more work needs to be done. I guess that is the reason why I did not yet solve this problem.

    BTW I see you really have lots of mappings, even with GIF and JPG/JPEG and WAV - that should be autodetected by libmagic, doesn't that work for you?

    Jin

     
  • Jin

    Jin - 2007-08-10
    • assigned_to: nobody --> jin_eld
    • labels: --> Media Import/Metadata Handling
    • priority: 5 --> 6
    • status: open --> open-accepted
     
  • Dominic Evans

    Dominic Evans - 2007-08-10
    • status: open-accepted --> open
     
  • Dominic Evans

    Dominic Evans - 2007-08-10

    Logged In: YES
    user_id=867078
    Originator: YES

    I have to do the mappings because I am using the ignore option to disable all filetypes that aren't enabled as a mapping here. See my feature request in the other section of tracker.

     
  • Jin

    Jin - 2008-02-23

    Logged In: YES
    user_id=1205152
    Originator: NO

    implemented in revision 1693

     
  • Jin

    Jin - 2008-02-23
    • milestone: --> Next Release
     
  • Jin

    Jin - 2008-03-02

    Logged In: YES
    user_id=1205152
    Originator: NO

    released in 0.11.0

     
  • Jin

    Jin - 2008-03-02
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks