You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2017/07/11 23:02:07 UTC

[1/2] cordova-plugin-file-transfer git commit: Fire successCallback for any 2XX HTTP status

Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master 5513bf302 -> 570bca0e0


Fire successCallback for any 2XX HTTP status

Found this bug when receiving a 201 response.

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/a7d3c876
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/a7d3c876
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/a7d3c876

Branch: refs/heads/master
Commit: a7d3c876506a0d694294c97e16d9e6b10b160c7a
Parents: 9cf583a
Author: Benjamin J DeLong <ho...@gmail.com>
Authored: Fri Jul 7 21:11:23 2017 -0300
Committer: GitHub <no...@github.com>
Committed: Fri Jul 7 21:11:23 2017 -0300

----------------------------------------------------------------------
 www/browser/FileTransfer.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/a7d3c876/www/browser/FileTransfer.js
----------------------------------------------------------------------
diff --git a/www/browser/FileTransfer.js b/www/browser/FileTransfer.js
index 14868ac..1cc6638 100644
--- a/www/browser/FileTransfer.js
+++ b/www/browser/FileTransfer.js
@@ -161,7 +161,9 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
                 }
 
                 xhr.onload = function() {
-                    if (this.status === 200) {
+                    // 2xx codes are valid
+                    if (this.status >= 200 &&
+                       this.status < 300) {
                         var result = new FileUploadResult(); // jshint ignore:line
                         result.bytesSent = blob.size;
                         result.responseCode = this.status;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/2] cordova-plugin-file-transfer git commit: Merge branch 'master' of https://github.com/bozdoz/cordova-plugin-file-transfer

Posted by pu...@apache.org.
Merge branch 'master' of https://github.com/bozdoz/cordova-plugin-file-transfer


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/570bca0e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/570bca0e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/570bca0e

Branch: refs/heads/master
Commit: 570bca0e06adbbd161d45b13306beefe732ee57d
Parents: 5513bf3 a7d3c87
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jul 11 16:01:53 2017 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jul 11 16:01:53 2017 -0700

----------------------------------------------------------------------
 www/browser/FileTransfer.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org