/// <summary>Uploads a file to the specified resource, asynchronously.</summary> /// <param name="webClient">The WebClient.</param> /// <param name="address">The URI to which the file should be uploaded.</param> /// <param name="method">The HTTP method that should be used to upload the file.</param> /// <param name="fileName">A path to the file to upload.</param> /// <returns>A Task containing the data in the response from the upload.</returns> public static Task <byte[]> UploadFileTask(this WebClient webClient, string address, string method, string fileName) { return(webClient.UploadFileTask(new Uri(address), method, fileName)); }