mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-05-17 00:00:03 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user