This is a little module, part of a school management application. The module has to take the data from a table containing pictures (jpg) of the students and send these to a ftp server. And the contrary should be possible too : to retrieve the pictures and the other fields from the ftp to put them back in the table.
- While sending : only the data new or modified in the table should be send to the ftp server. The records removed from the table should also be removed from the ftp.
- While receiving : only the data new or modified in the ftp should be downloaded to the table. (Nothing is removed from the table, but infos are given about all the records eventually present in the table and not in the ftp)
I know, we could just do a dump or backup of the table but our problem is the internet traffic. The school has very poor internet connection and the number of records may grow fast, so the more important thing is to reduce the internet traffic to the minimum.
Delphi, Mysql, Indy10 and crlab MyDac components have to be used. Code should be provided.
You can see the already started development I did for this module (see attachment). I think however that it is far from being perfect, for example : I use temporary local files instead of working with data in memory. I consider only the picture data, not the other fields. I compare files size one by one instead of retrieving the whole directory infos at once. And only the upload part has been strated.