Android Question Problem whith FTP.AppendFile

TMourlan

Member
Licensed User
Hello,

I have for example a 1326 bytes RandomAccessFile (26 bytes per record) but it could be smaller or quite bigger...

I want to transfer it by ftp and I use AppendFile method, the file on ftp becomes unconsistant, (even if there si no previous file on ftp), and few records (randomly ?) are 25 bytes long !
For example, with my 1326 bytes file on start, I receive a 1325 bytes files because the 34st record is 25 bytes long. So all records from 34th are unreadable ...

If I use UploadFile it always works and I always receive a consistant file on ftp
wait for(FTP.UploadFile(File.DirInternalCache,"ENTREES.DAT",False,"/transfert/ENTREES.DAT")) FTP_UploadCompleted(ServerPath As String,Success As Boolean)

but if I use (because I need) an AppendFile, it generally does'nt work (The bigger the file, the less it works....)
wait for(FTP.AppendFile(File.DirInternalCache,"ENTREES.DAT",True,"/transfert/ENTREES.DAT")) FTP_UploadCompleted(ServerPath As String,Success As Boolean)

Is there something I'm doing wrong?

Thank you.
 

DonManfred

Expert
Licensed User
Longtime User
wait for(FTP.AppendFile(File.DirInternalCache,"ENTREES.DAT",True,"/transfert/ENTREES.DAT"))
is is a TEXT-file? TRUE implies you are sending a textfile. Not any binary file.
 
Upvote 0

TMourlan

Member
Licensed User
RandomAccessFile is a text file ? UploadFiles has not the same parameters (with UploadFiles it always works. OK, I try with "False".
 
Upvote 0

TMourlan

Member
Licensed User
I tried with "false" with a 1638 bytes file (63 records of 26 bytes) and with Uploadfile I receive 1638 bytes, with AppendFile I receive 1636 bytes, the 61st record is unconsistant... "True" or "False" have same effect.
 
Upvote 0
Top