Autor Beitrag
Ak-Alex
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 28.04.03 15:34 
dumme frage aber wie speicher ich eine mit indy runtergeladene datei....


hab bis jetzt noch nie mit indy gearbeitet....
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Mo 28.04.03 16:03 
Hi,
meist gibbet ne Funktion Id<Kompo>1.CaptureStream() oder so ... da mist sollte das dann gehen :)

MfG BungeeBug
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Mo 28.04.03 16:04 
SORRY Doppelpost ... bitte löschen

MfG BungeeBug
Ak-Alex
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 28.04.03 16:12 
könnte jemand mal nen code posten?


also ich lad die datei runter mit idhttp1.get('http://www.url.de/datei.exe');

und wie gehe ich weiter vor?
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Mo 28.04.03 16:40 
Also, das ganze musst du mit nem Filestream machen:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure DownloadWithIndy;
var Datei: TFIleStream;
      woher,wohin: String;
begin
  woher:='http://www.../test.html'; //Quelle
  wohin:='C:\test.html'; //Ziel
  Datei:=TFileStream.create(wohin,[fsCreate]);
  IdHttp1.Get(woher,Datei);
  Datei.free;
end;

Schlag mich nicht wenn was nicht geht. Hab den Code eben so abgetippt. Sollte aber gehen und er sollte selbsterklärend sein.
Ak-Alex
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 28.04.03 16:43 
fscreate ist undeclariert....??????? hähh
Ak-Alex
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 28.04.03 16:54 
hab den fehler:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure DownloadWithIndy; 
var Datei: TFIleStream; 
      woher,wohin: String; 
begin 
  woher:='http://www.../test.html'; //Quelle 
  wohin:='C:\test.html'; //Ziel 
  Datei:=TFileStream.create(wohin,fmCreate); 
  IdHttp1.Get(woher,Datei); 
  Datei.free; 
end;
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Mo 28.04.03 16:55 
Ja, tut mir leid, ich hab das Teil eben so geschrieben. Geht es jetzt wenigstens?
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Mo 28.04.03 16:55 
mach daraus fmCreate dann gehts :)

MfG BungeeBug

P.S.: Keine []
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Mo 28.04.03 17:01 
Ja, ich verwechsle das immer ein bisschen mit MessageDlg und noch was, dass mir grade nicht einfällt.
Verdammt, wie heißt die Kranktheit nochmal, wo man alles vergisst? :lol:
Ak-Alex
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 28.04.03 17:28 
trotzdem herzlichen dank onz
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Mo 28.04.03 17:29 
Bittebitte... Gerne geschehen.
r!pper
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Mi 04.02.04 18:44 
gibt nen problem, wenn die datei, die man downloaden will nicht auf dem server ist. und zwar wird die file mit dem gewünschten namen erstellt, dann wird die 404 seite reingeladen und der stream bricht net ab. zu der vermutung komme ich, da es nen dicken fehler gibt und außerdem lässt sich die erstellte datei nicht löschen, verändern etc.

man müsste also entweder prüfen, ob die file aufm server überhaupt drauf is oder stream irgendwie abbrechen. wie macht man das am besten?
Ist die Frage beantwortet? Das Problem gelöst?

Dann klicke hier, um das Thema entsprechend zu markieren!