I am building an updater for my program with the use of a TWebBrowser. OnCreate the TWebBrowser navigates to the given URL. To download the update, the user is required to c
I would use Indy's TIdHTTP component for that, eg:
uses
..., IdHTTP;
var
Url, LocalFile: String;
Strm: TFileStream;
begin
Url := ...;
LocalFile := ...;
Strm := TFileStream.Create(LocalFile, fmCreate);
try
try
IdHTTP.Get(Url, Strm);
finally
Strm.Free;
end;
except
DeleteFile(LocalFile);
raise;
end;
end;