PDA

View Full Version : How do I set the applet to automatically resume a transfer if it fails?


lsalas
06-09-2008, 10:48 PM
Secure FTP Applet has a parameter named retryLimit. This parameter controls the number of times the applet will retry a transfer if an error occurs during transfer. By default this value is set to 0, meaning that if a file transfer fails the applet will not retry the transfer and will instead show an error dialog indicating that the transfer failed. By increasing the retryLimit value you can instruct the applet to resume file transfers N number of times. When resuming a file transfer the transfer starts from the last byte successfully sent. This is beneficial in that if a transfer fails at 95% of the transfer you only have to transfer the last 5% of the file, not the entire file.

Example

In params.txt file the following parameter is added

retryLimit = 5


Using the above code the applet will retry failed transfers up to 5 times before showing an error dialog to the user indicating a failed transfer.