Resuming uploads

Top  Previous  Next

If a file fails to upload completely you can resume the upload using any of the Ftp#resumeUpload methods.  Prior to using the Ftp#resumeUpload method you must first determine how much of the file in bytes was successfully uploaded.  To do this you may use the Ftp#getFilesize method which will return the length of the remote file in bytes.

 

Example

 

// get length of remote file

long offset = ftp.getFilesize("setup.zip");

 

// resume file upload starting from offset

ftp.resumeUpload(new File("c:/setup.zip"),offset);

 

Note

 

Resuming uploads is only possible when transferring files in binary mode.  Resuming a transfer in ASCII mode is not supported.

 

 

 





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC