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 2013/09/30 23:10:25 UTC
[3/4] git commit: Fix missing headers in Windows 8 upload proxy
Fix missing headers in Windows 8 upload proxy
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/02afbec0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/02afbec0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/02afbec0
Branch: refs/heads/dev
Commit: 02afbec042f76fab8e6fc23825a913d69aa2b23c
Parents: e80d078
Author: Maxime LUCE <so...@live.fr>
Authored: Wed Sep 18 03:43:14 2013 +0200
Committer: Maxime LUCE <so...@live.fr>
Committed: Wed Sep 18 03:43:14 2013 +0200
----------------------------------------------------------------------
www/windows8/FileTransferProxy.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/02afbec0/www/windows8/FileTransferProxy.js
----------------------------------------------------------------------
diff --git a/www/windows8/FileTransferProxy.js b/www/windows8/FileTransferProxy.js
index cbfcfd7..036b948 100644
--- a/www/windows8/FileTransferProxy.js
+++ b/www/windows8/FileTransferProxy.js
@@ -29,6 +29,7 @@ module.exports = {
upload:function(successCallback, error, options) {
var filePath = options[0];
var server = options[1];
+ var headers = options[8] || {};
var win = function (fileUploadResult) {
@@ -49,7 +50,7 @@ module.exports = {
var blob = MSApp.createBlobFromRandomAccessStream(storageFile.contentType, stream);
var formData = new FormData();
formData.append("source\";filename=\"" + storageFile.name + "\"", blob);
- WinJS.xhr({ type: "POST", url: server, data: formData }).then(function (response) {
+ WinJS.xhr({ type: "POST", url: server, data: formData, headers: headers }).then(function (response) {
var code = response.status;
storageFile.getBasicPropertiesAsync().done(function (basicProperties) {