cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [11/17] git commit: CB-4899 [BlackBerry10] Improve binary file transfer download
Date Mon, 10 Feb 2014 23:22:23 GMT
CB-4899 [BlackBerry10] Improve binary file transfer download


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/613ee821
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/613ee821
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/613ee821

Branch: refs/heads/master
Commit: 613ee821df54d58af64bfa512e3a57857dac87a0
Parents: 73541fb
Author: Bryan Higgins <bhiggins@blackberry.com>
Authored: Thu Jan 9 11:24:08 2014 -0500
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Thu Jan 9 11:25:32 2014 -0500

----------------------------------------------------------------------
 www/blackberry10/XHRImplementation.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/613ee821/www/blackberry10/XHRImplementation.js
----------------------------------------------------------------------
diff --git a/www/blackberry10/XHRImplementation.js b/www/blackberry10/XHRImplementation.js
index 13752ee..974e06f 100644
--- a/www/blackberry10/XHRImplementation.js
+++ b/www/blackberry10/XHRImplementation.js
@@ -146,7 +146,7 @@ module.exports = {
         xhr = new XMLHttpRequest();
 
         function writeFile(entry) {
-            entry.createWriter(function (writer) {
+            entry.nativeEntry.createWriter(function (writer) {
                 fileWriter = writer;
                 fileWriter.onwriteend = function (evt) {
                     if (!evt.target.error) {
@@ -188,13 +188,13 @@ module.exports = {
         xhr.onprogress = function (evt) {
             win(evt);
         };
-
         xhr.open("GET", source, true);
         for (var header in headers) {
             if (headers.hasOwnProperty(header)) {
                 xhr.setRequestHeader(header, headers[header]);
             }
         }
+        xhr.responseType = "blob";
         xhr.send();
         return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
     }


Mime
View raw message