private void UploadNextChunk()
{
var chunkIndex = ChunkIndex;
if(State != TransactionState.Started)
return;
_client.Upload().Transfer(_uploadToken.UploadID, chunkIndex, new FileData(FileName, _fileData, _fileData.Position, _uploadToken.ChunkSize)).WithCallback(TransferCompleted).UploadProgressChanged
+= (sender, args) => Progress = (ChunkIndex - 1 + Math.Min(0.99, args.NewValue)) / _uploadToken.NoOfChunks; //Math.Min() is used to prevent progress from reaching completed
}