i am using Webclient to upload data using Async call to a server,
WebClient webClient = new WebClient();
webClient.UploadDataAsync(uri , "PUT", buffer, userToken);
i've attached DatauploadProgress and DatauploadCompleted Events to appropriate callback functions
// Upload Date Progress
webClient.UploadProgressChanged += new
UploadProgressChangedEventHandler(UploadProgressCallback);
// Upload Date Progress
void UploadProgressCallback(object sender, UploadProgressChangedEventArgs e)
{
// Magic goes here
}
i am trying to assign chunck/partial file upload size, to make the Callback Function get called at chosen periodic times.
Note:
i know i can use e.BytesSent to read the bytes sent when the callback function gets called, but that's not what i am trying to do.