Is there a way to upload a file with ftp4j in append mode? I can't find any reference to that in the documentation or on google. Thank you!
Asked
Active
Viewed 1,688 times
2 Answers
1
Starting from frp4j 1.6 you can use the append() method:
- append(File)
- append(File, FTPDataTransferListener)
- append(String, InputStream, long, FTPDataTransferListener)

Franco Marchi
- 26
- 1
0
The FTPClient.upload(File file, long RestartAt) method can restart an upload. The parameter restartAt
specifies the restart point (number of bytes already uploaded). Use isResumeSupported() to check if the server supports resuming of broken data transfers.

Giuseppe Cardone
- 5,323
- 2
- 24
- 30
-
what we need is something that would append to a file even if the new file is a smaller file. Eventually we changed the way we did this, so, thank you very much anyways :) – Alberto M Sep 14 '10 at 07:25
-
-
According to the documentation, append will, well, append the file to an existing remote file. upload with restartAt resumes an upload. So if you call append multiple times, the remote file will repeat the same content multiple times, If you call upload multiple times, you should end up with the same file server-side. I did not test this myself, so *caveat emptor*. – Giuseppe Cardone Jul 30 '15 at 09:16