Pause/Resume Upload in C#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 8
Reputation: djzmo is an unknown quantity at this point 
Solved Threads: 0
djzmo djzmo is offline Offline
Newbie Poster

Pause/Resume Upload in C#

 
0
  #1
Jun 26th, 2009
Hello, I'm looking for a way to pause or resume an upload process via C#'s WebClient.

pseudocode:
  1. WebClient Client = new WebClient();
  2. Client.UploadFileAsync(new Uri("http://mysite.com/receiver.php"), "POST", "C:\MyFile.jpg");

Maybe something like..

  1. Client.Pause();

any idea?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,248
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 578
Sponsor
sknake's Avatar
sknake sknake is online now Online
.NET Enthusiast

Re: Pause/Resume Upload in C#

 
0
  #2
Jun 26th, 2009
To truly pause an upload you should kill the connection. Another method would be to manually control sending the chunks of data and start sending a minimal amount of data so the transfer is not truly pause but is sending enough data to keep the connection alive. This isn't a straightforward task unless you use resumed uploading:

http://www.webdavsystem.com/client/p...sumable_upload
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC