From c9aa43afe0a1dff6f3b57a458fce4de7e667faed Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Thu, 10 Jan 2013 11:32:37 -0800 Subject: [PATCH] CB-2185: Fixing getMimeType to get the mimetype of the file if it is upper-case --- framework/src/org/apache/cordova/FileUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java index aa695acf..35496e72 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")) {