lundorff
asked on
More about HTTPget
1) Is there a way to determind the filesize of a file before downloading it?
Rgs
Lund
Rgs
Lund
ASKER
Oh sorry please read this https://www.experts-exchange.com/questions/20398745/HTTPget-from-utilmind.html
I want to know if I can use the HTTPget component to easily determind the filesize of a file stored in the HTTPget1.?
I want to know if I can use the HTTPget component to easily determind the filesize of a file stored in the HTTPget1.?
ASKER
I just took a look at the indy-component IdHTTP and it does has the size-function I need. How do I get a list of alle the links on a given page using the Indy component instead?
ASKER
I just took a look at the indy-component IdHTTP and it does has the size-function I need. How do I get a list of alle the links on a given page using the Indy component instead?
ASKER
I just took a look at the indy-component IdHTTP and it does has the size-function I need. How do I get a list of alle the links on a given page using the Indy component instead?
ASKER
I just took a look at the indy-component IdHTTP and it does has the size-function I need. How do I get a list of alle the links on a given page using the Indy component instead?
ASKER
let me see now.. this piece of code
procedure TForm1.Button4Click(Sender : TObject);
var
test: TFileStream;
size: integer;
begin
test := TFileStream.Create('c:\log o.mpeg',fm create);
IndyHTTP.Get('http://domain.com/logo.jpg',test);
test.Free
end;
will let me download the picture "logo.jpg" form domain.com but if I want to know the size of "logo.jpg" I must write the following before I download:
IndyHTTP.Head('http://domain.com/logo.jpg');
size := IndyHTTP.Response.ContentL enght;
The problem is that I acutally is downloading the picture twice in order to check it......... how do I check the filesize with downloading the file?
Rgs
Lund
procedure TForm1.Button4Click(Sender
var
test: TFileStream;
size: integer;
begin
test := TFileStream.Create('c:\log
IndyHTTP.Get('http://domain.com/logo.jpg',test);
test.Free
end;
will let me download the picture "logo.jpg" form domain.com but if I want to know the size of "logo.jpg" I must write the following before I download:
IndyHTTP.Head('http://domain.com/logo.jpg');
size := IndyHTTP.Response.ContentL
The problem is that I acutally is downloading the picture twice in order to check it......... how do I check the filesize with downloading the file?
Rgs
Lund
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hallo,
what do I need to declare in users in order to use "hInternet"? Im using Delphi 6
Rgs
Lund
what do I need to declare in users in order to use "hInternet"? Im using Delphi 6
Rgs
Lund
ASKER
Hallo,
what do I need to declare in users in order to use "hInternet"? Im using Delphi 6
Rgs
Lund
what do I need to declare in users in order to use "hInternet"? Im using Delphi 6
Rgs
Lund
ASKER
Works like a charm thx :)
what file you mean, and direction - upload to server/download from client ?