Delphi – app using TIdFTP not migrating from Delphi 5 to Delphi 2009…corrupt uploads

delphidelphi-2009indy

i wrote a Delphi 5 app that uses TIdFTP. it's been working great for years. it's only purpose is to upload an excel file.

object ftp: TIdFTP
  OnStatus = ftpStatus
  IPVersion = Id_IPv4
  AutoLogin = True
  Host = 'somewhere.ca'
  Passive = True
  Password = 'guess'
  TransferType = ftBinary
  Username = 'xray'
  ProxySettings.ProxyType = fpcmNone
  ProxySettings.Port = 0
end

i recently migrated to delphi 2009 since i reloaded my machine and delphi 5 is gone now.

the app still looks like it's working but–most of the way through the 1.5 MB file the file becomes corrupt. it looks like bytes have been deleted and the uploaded file is shorter than the original (by about 200 bytes).

my first thought was the transfer type so i set it to Binary but beyond that, i don't know.

any ideas?

thank you!
mp

Best Answer

What version of Indy are you using? Have you tried the latest one?
Also, did you try with other types of files (plain text, executables...)