uploaddataasync

WebClient AsyncUpload progress percentage always returns 50%

你说的曾经没有我的故事 提交于 2019-12-18 06:54:08
问题 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

WebClient AsyncUpload progress percentage always returns 50%

不问归期 提交于 2019-11-29 11:04:11
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 logger.writeToLog("Percentage =" + e.ProgressPercentage); } the e.ProgressPercentage always