Add bytesWritten property and tests for chunk-uploaded event
Merge upstream changes