我的Xamarin表格文件上传代码不会转到下一条语句
WebClient client = new WebClient();
// add event listeners
client.UploadProgressChanged += Client_UploadProgressChanged;
client.UploadFileCompleted += Client_UploadFileCompleted;
// set the file type
client.Headers.Add("Content-Type", "application/zip");
// upload the file - tried below statements
var result = await Task.Run(async () => await client.UploadFileTaskAsync(UpLoadURL, "POST", File));//stucks here forever
await client.UploadFileTaskAsync(UpLoadURL, "POST", File);//tried this too
Console.WriteLine("Test");//this line does not get executed