How to do Pause and resume file while uplaoding on ftp server

  • 12 years ago

    Hi ,

      I am developing ftp client application using I done uplaoding file but i want to pause that file  while uplaoding and again resume that pause file.Is there any method avilble to pause and resume file.

    Is any one having idea about this how can i do this.


  • 12 years ago

    The FTP protocol does not have a "pause" function.  The way you would accomplish this is as follows:

    1.  Cancel the upload by canceling the write process (this assumes you are writing data to server in chunks e.g. 1024 byte chunks).

    2.  Get size  of remote file partially uploaded.  This can be done using the SIZE [filename] command and will return the partial file upload size.

    3.  Send REST [offset] command to, where [offset] is the length of partial file upload.

    4.  Send STOR [filename] command as you would using normal file upload.  

    5.  Send data for [filename] starting with [offset].

    For an API that does this for you, check out the following FTP .NET API.  The method you want to use is Ftp.ResumeUpload






Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...'” - Isaac Asimov