Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in .NET FTP by (160 points)
Curious if theres a way to append to a file. The problem I have is I have a program that dumps some data to a local client than it uploads it to a server via edtftp and everytime that it gets uploaded the data file it uploads has grown, more data has been added (appeneded) to the end of it and instead of re-uploading the entire file I would rather just add the new data to the end of the file. Is this at all possible? if so how would I go about doing something like that?

2 Answers

0 votes
by (160 points)
I've figured out how to append to a file with ftpconnection.put(filename, filename, true) however the problem I have now is that it takes the original data uploads it, than it takes the original data agian plus the new data and adds that to the end of the file, and does this over and over agian so if my file is 11 megs and I add a meg of data to the end of it instead of it uploading just that 1 meg it uploads the 11 megs agian to the end of that file plus the one meg, so the first time around it uploads the 11 meg file, than it attaches that same 11 megs to the end of the file plus that one extra meg and continues to do this everytime it uploads. Whats going on how can I stop it from doing this?
0 votes
by (162k points)
What is going on is that you are directing the client to upload the entire file and that is what it is doing.

Try using a stream to read the file and skip ahead to the correct point in the file that you want to upload from. Then pass the stream in.

Categories

...