Please advice me where I could find a "simple download" example of ICS v8.70 ?
I'm still using Delphi7, so I was told it is not recommended to update to the new 9.0 version.
With Indy10 it was extremely simple to do:
IdHTTP1.ConnectTimeout := 2000;
try
FS := TFileStream.Create(save_path, fmCreate);
except Exit; end;
try //'http://...'
IdHTTP1.Get(theURL , FS);
if IdHTTP1.ResponseCode = 200 then ...
...
Also I was able to update the request status + the progress:
function get_httpStatus(const AStatus: TIdStatus; const AStatusText: String): string;
var s: string;
begin
case AStatus of
hsResolving : s := 'Webszerver (DNS) keresése...';
hsConnecting : s := 'Kapcsolódás a webre...';
hsConnected : s := 'A kapcsolódás sikeres.';
hsDisconnecting : s := 'A kapcsolat bontása';
hsDisconnected : s := 'A kapcsolat BONTVA.';
hsStatusText : s := 'Állapot:'+AStatusText;
ftpTransfer : s := 'Adatáttöltés...(FTP)';
ftpReady : s := 'Készen áll az adattöltésre (FTP)';
ftpAborted : s := ' ! MEGSZAKÍTVA !';
end;
Result := s;
end;
procedure TFrm_myDownload.IdHTTP1Status(ASender: TObject; const AStatus: TIdStatus; const AStatusText: String);
begin
lbl_status.Caption := get_httpStatus(AStatus, AStatusText);
lbl_status.Repaint;
end;
So how do I do the same with ICS?
- need timeout
- need progress update (not the ICS progress bar, but my own)
- need status update (localized!)
PS:
I've spent ca. 30 hours so far reading FAQ + Getting Started + opening and analysing the examples inside ..\ICS\Samples\Delphi directory,
but found nothing, except:
- the "OverbyteIcsHttpMultipartDownload.dpr", which ended up with catastrophe:
PS2.: [edit]
Also used "search" on this page with multiple keywords, checking 200+ topics, but found no answer.