Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master 3bdf3775e -> 156ae2092


Upload progress now works also for second file

- Sent bytes must be reseted before new upload, otherwise "onprogress" event 
"loaded" value provides sum of uploaded bytes (not just for the current upload, 
but all of them)


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

Branch: refs/heads/master
Commit: 70463c238aa3668c133cbfe88fe4646b1c46a4a6
Parents: c0c91d0
Author: Martin Hujer <[email protected]>
Authored: Sat Mar 8 22:33:37 2014 +0100
Committer: Martin Hujer <[email protected]>
Committed: Sat Mar 8 22:33:37 2014 +0100

----------------------------------------------------------------------
 src/wp/FileTransfer.cs | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/70463c23/src/wp/FileTransfer.cs
----------------------------------------------------------------------
diff --git a/src/wp/FileTransfer.cs b/src/wp/FileTransfer.cs
index f8b6ed5..6b18931 100644
--- a/src/wp/FileTransfer.cs
+++ b/src/wp/FileTransfer.cs
@@ -765,6 +765,8 @@ namespace WPCordovaClassLib.Cordova.Commands
 
                             byte[] buffer = new byte[4096];
                             int bytesRead = 0;
+                            //sent bytes needs to be reseted before new upload
+                            bytesSent = 0;
                             totalBytesToSend = fileStream.Length;
 
                             requestStream.Write(boundaryBytes, 0, 
boundaryBytes.Length);

Reply via email to