Pause/Resume Upload in C#

前端 未结 4 1832
我在风中等你
我在风中等你 2021-01-14 07:00

I\'m looking for a way to pause or resume an upload process via C#\'s WebClient.

pseudocode:

WebClient Client = new WebClient();
Client.UploadFileAsync(new         


        
4条回答
  •  感动是毒
    2021-01-14 07:13

    WebClient doesn't have this kind of functionality - even the slightly-lower-level HttpWebRequest doesn't, as far as I'm aware. You'll need to use an HTTP library which gives you more control over exactly when things happen (which will no doubt involve more code as well, of course). The point of WebClient is to provide a very simple API to use in very simple situations.

提交回复
热议问题