diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java index f6db0ac7..aeca5057 100755 --- a/framework/src/org/apache/cordova/FileUtils.java +++ b/framework/src/org/apache/cordova/FileUtils.java @@ -949,7 +949,7 @@ public class FileUtils extends CordovaPlugin { result = new PluginResult(PluginResult.Status.OK, bytes, true); break; default: // Base64. - String contentType = dataResource.getMimeType(); + String contentType = FileHelper.getMimeType(filename, cordova); byte[] base64 = Base64.encode(bytes, Base64.DEFAULT); String s = "data:" + contentType + ";base64," + new String(base64, "US-ASCII"); result = new PluginResult(PluginResult.Status.OK, s);