From e95bde62a24557c903234adcef2f8e9c087d5d45 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Mon, 12 Nov 2012 10:22:35 -0500 Subject: [PATCH] Correctly report the mime type of 3ga files --- framework/src/org/apache/cordova/FileUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java index c2f90b64..8aff2629 100755 --- a/framework/src/org/apache/cordova/FileUtils.java +++ b/framework/src/org/apache/cordova/FileUtils.java @@ -988,7 +988,12 @@ public class FileUtils extends CordovaPlugin { // So we need to replace the space with a url encoded %20 String url = filename.replace(" ", "%20"); MimeTypeMap map = MimeTypeMap.getSingleton(); - return map.getMimeTypeFromExtension(MimeTypeMap.getFileExtensionFromUrl(url)); + String extension = MimeTypeMap.getFileExtensionFromUrl(url); + if (extension.toLowerCase().equals("3ga")) { + return "audio/3gpp"; + } else { + return map.getMimeTypeFromExtension(extension); + } } /**