Construct proper FileEntry with nativeURL property set

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

Branch: refs/heads/master
Commit: 223191f9bc6083abfe84dfca6e1e6fc0fa5a5f8f
Parents: 2b86a85
Author: Vladimir Kotikov <[email protected]>
Authored: Fri Sep 12 12:08:16 2014 +0400
Committer: Vladimir Kotikov <[email protected]>
Committed: Fri Sep 12 16:02:31 2014 +0400

----------------------------------------------------------------------
 src/windows/FileTransferProxy.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/223191f9/src/windows/FileTransferProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/FileTransferProxy.js b/src/windows/FileTransferProxy.js
index 2523c81..0eeef90 100644
--- a/src/windows/FileTransferProxy.js
+++ b/src/windows/FileTransferProxy.js
@@ -229,8 +229,12 @@ exec(win, fail, 'FileTransfer', 'upload',
                         currentDownloadOp.promise = null;
                     }
 
-                    successCallback && successCallback(new 
FileEntry(storageFile.name, storageFile.path));
-                }, function (error) {
+                    var nativeURI = 
storageFile.path.replace(Windows.Storage.ApplicationData.current.localFolder.path,
 'ms-appdata:///local')
+                        
.replace(Windows.Storage.ApplicationData.current.temporaryFolder.path, 
'ms-appdata:///temp')
+                        .replace('\\', '/');
+
+                    successCallback && successCallback(new 
FileEntry(storageFile.name, storageFile.path, null, nativeURI));
+                }, function(error) {
 
                     var result;
                     // Handle download error here. If download was cancelled,

Reply via email to