Link to home
Start Free TrialLog in
Avatar of jamiguel
jamiguel

asked on

Best Way for Upload Files to WebServer.. How Create a CGI in delphi?

wich is the best way for upload a text file to webserver?

i know how download:

  if paramstr(1)='1' then
    assignfile(f,ExtractFilePath(Application.ExeName)+'Tablei.dbh')
  else
  begin
    IdHTTP1.HandleRedirects := True;
    Stream := TMemoryStream.Create;
    IdHTTP1.Get('http://www.grupolanortenita.com/miguel/Tablai.dbh', Stream);
    Stream.Position := 0;
    Stream.SaveToFile(GetWindowsTempDirectory+'_Xi.tmp');
    Stream.free;
    assignfile(f,GetWindowsTempDirectory+'_Xi.tmp')
  end;
  reset(f);

i know that exist 2 ways:
via FTP and/or creating a CGI, how create a CGI?

thanks

ASKER CERTIFIED SOLUTION
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jamiguel
jamiguel

ASKER

But the cgi? how start program the cgi?

thanks
Depending on what version of Delph you have, you choose "File-New" - and then in the wizard that appears you can choose 2 kinds of CGI application
If you have a personal edition of Delphi (as opposed to Client/server or enterprise) then this option may not be available
Forced accept.

Computer101
EE Admin