Upload progress needs to be fixed 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 PR fixes the issue for me, but there is additional work necessary:
- check if this does not break anything
- check if it works for file downloading (I'm not using it myself).