Resuming uploads

Top  Previous  Next

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

 

Example

 

// get length of remote file

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

 

// resume file upload starting from offset

ftps.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