i made a program in delphi that upload picture to kinvey provider, first the program saves the image from TImage component in a specific Dir then upload it to kinvey, the issue is every time i open the program it uploads to kinvey, now how to make sure that it only upload one time even if i opened the program multiple times
Image1.Repaint;
Image1.Bitmap.SaveToFile('some dir');
procedure TTabbedwithNavigationForm.Timer2Timer(Sender: TObject);
var
fn : string;
Lstream : TFileStream;
Lfile : TBackendEntityValue;
begin
fn := 'the file dir';
try
Lstream := TFileStream.Create(fn, fmOpenRead);
BackendFiles1.Files.UploadFile(fn,Lstream, 'image/png',Lfile);
finally
Lstream.Free;
BackendFiles1.Free;
end;
end;
end.