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)
This commit is contained in:
Martin Hujer
2014-03-08 22:33:37 +01:00
parent c0c91d0245
commit 70463c238a
+2
View File
@@ -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);