You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Christian Kuetbach (JIRA)" <ji...@apache.org> on 2013/02/20 15:43:14 UTC

[jira] [Resolved] (CB-2501) FileUtils.getMimeType(String file) is case sensitive, but should not

     [ https://issues.apache.org/jira/browse/CB-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Kuetbach resolved CB-2501.
------------------------------------

       Resolution: Duplicate
    Fix Version/s: 2.4.0

Did not find the duplicate, as I searched for the Issue. Anyway, I linked the cause of the actual bug to this ticket.
                
> FileUtils.getMimeType(String file) is case sensitive, but should not
> --------------------------------------------------------------------
>
>                 Key: CB-2501
>                 URL: https://issues.apache.org/jira/browse/CB-2501
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>            Reporter: Christian Kuetbach
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> There is a bug in Android: http://code.google.com/p/android/issues/detail?id=8806
> Because of this the returned mime type will be wrong, if the file extension is not lowercase.
> myImage.jpg -> image/jpg
> myImage.JPG -> null
> I will provide a patch, which simply converts the filepath to lower case, but think there is a better solution than using the MimeTypeMap. The Class ContentResolver has a method getType() 
> http://developer.android.com/reference/android/content/ContentResolver.html#getType(android.net.Uri)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira