[ICS] -> Problème d'upload avec FtpClient ?
Bonjour,
J'essai d'uploader la même image deux fois de suite sous deux noms différents mais l'image est complètement corrompue.
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Fichier := FormatDateTime('yyyy-mm-dd hh-nn-ss',Horaire) + '.jpg';
FtpClient1.HostName := Ini_FTP_Host;
FtpClient1.UserName := Ini_FTP_Login;
FtpClient1.PassWord := Ini_FTP_Password;
FtpClient1.Passive := true;
try
FtpClient1.Connect;
FtpClient1.Binary := true;
FtpClient1.LocalFileName := Ini_Path + Fichier;
FtpClient1.HostDirName := Ini_FTP_Path;
FtpClient1.HostFileName := 'webcam.jpg';
FtpClient1.Put;
FtpClient1.LocalFileName := Ini_Path + Fichier;
FtpClient1.HostDirName := Ini_FTP_Path;
FtpClient1.HostFileName := Fichier;
FtpClient1.Put;
FtpClient1.Quit;
finally
end; |
L'image webcam.jpg existe déjà et doit être ecrasée, je ne sais pas si FtpClient le fait par défaut...
Savez-vous comment je peux faire ?
Merci,
Mathieu