Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.1k views
in .NET FTP by (320 points)
hi all,
i have posted a reply on another topic, i said:
i wants to add (pause - resume) facility.
so when pausing i use cancelTransfer(), then when resuming i use uploadFile() with Append=true but it just replace the partial file which already exists.

i tried also resumeTransfer() but if there a partial file it replaces it, if not it calls Uploaded event without uploading anything
what should i do?

Thanks


after some testing i have found that ftpclient.put() can resume while ftpconnection.resumetransfer() can't, why that is happening?? is there is away to fix it??

thanks

3 Answers

0 votes
by (162k points)
Both FTPClient (which is being obsoleted) and FTPConnection support resuming transfers.

after some testing i have found that ftpclient.put() can resume while ftpconnection.resumetransfer() can't, why that is happening?? is there is away to fix it??

thanks
0 votes
by (320 points)
i tried calling ftpconnection.resumeTransfer(), but the file uploading starts from the begining.
i don't know why that's happening, any ideas please?
Thanks
0 votes
by (320 points)
i was thinking that ftpconnection doesn't resume transfers because i thought that bytestransfered event will send back the total bytes transfered (including the partial file size).
so i figured out that ftpconnection not evil, bytestransfered is evil :) .

the second issue i'm facing is :
i have added the following code to the closing event
if (ftpConnection1.IsTransferring)
ftpConnection1.CancelTransfer();
if (ftpConnection1.IsConnected)
ftpConnection1.Close(true);


but when i close the application it hangs. i tried changing the timeout property but there is no difference.
another thing some times it closes but still in the processes list.

thanks

Categories

...