Updated Branches: refs/heads/master a1cfe87f1 -> c9aa43afe
CB-2185: Fixing getMimeType to get the mimetype of the file if it is upper-case Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/c9aa43af Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/c9aa43af Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/c9aa43af Branch: refs/heads/master Commit: c9aa43afe0a1dff6f3b57a458fce4de7e667faed Parents: a1cfe87 Author: Joe Bowser <[email protected]> Authored: Thu Jan 10 11:32:37 2013 -0800 Committer: Joe Bowser <[email protected]> Committed: Thu Jan 10 11:32:37 2013 -0800 ---------------------------------------------------------------------- framework/src/org/apache/cordova/FileUtils.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-android/blob/c9aa43af/framework/src/org/apache/cordova/FileUtils.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java index aa695ac..35496e7 100755 --- a/framework/src/org/apache/cordova/FileUtils.java +++ b/framework/src/org/apache/cordova/FileUtils.java @@ -1022,7 +1022,9 @@ public class FileUtils extends CordovaPlugin { if (filename != null) { // Stupid bug in getFileExtensionFromUrl when the file name has a space // So we need to replace the space with a url encoded %20 - String url = filename.replace(" ", "%20"); + + // CB-2185: Stupid bug not putting JPG extension in the mime-type map + String url = filename.replace(" ", "%20").toLowerCase(); MimeTypeMap map = MimeTypeMap.getSingleton(); String extension = MimeTypeMap.getFileExtensionFromUrl(url); if (extension.toLowerCase().equals("3ga")) {
