You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/06/06 23:36:08 UTC

[6/6] android commit: Trying to get DataResource reverted so that we don't have to worry about this blowing up while we're breaking things out. DataResource should be on a branch until it's ready!

Trying to get DataResource reverted so that we don't have to worry about this blowing up while we're breaking things out.  DataResource should be on a branch until it's ready!


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/3753e3f3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/3753e3f3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/3753e3f3

Branch: refs/heads/master
Commit: 3753e3f3532da0f4dbd08ee1c1b68cf5be6465b9
Parents: 979d8e6
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Jun 6 14:35:12 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Jun 6 14:35:12 2013 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileUtils.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3753e3f3/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 f6db0ac..aeca505 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);