Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi TIWApplication.SendFile [IntraWeb] (https://www.delphipraxis.net/76342-tiwapplication-sendfile-%5Bintraweb%5D.html)

Cetus 2. Sep 2006 20:45


TIWApplication.SendFile [IntraWeb]
 
Hi erstmal,

Ich hab ein Problem mit der TIWApplication.SendFile Procedure in IntraWeb Version 8.0.1.
Anstatt das die übergebene Datei gesendet wird, wird der HTML Code der Seite als Datei geschickt.
Ich hoffe es kann mir jemand hlefen, ich hab selbst schon alles mögliche Versucht.
Danke schon mal im vorraus.

Hier mal der Code:

Delphi-Quellcode:
procedure TIWServerController.IWServerControllerBaseNewSession(
  ASession: TIWApplication;
  var VMainForm: TIWBaseForm);
var
  i:   integer;
begin
  ASession.Data := TIWUserSession.Create(nil);
  if WebApplication.RunParams.Count = 2 then
  begin
    for i := 0 to FileAuthCodes.Count - 1 do
    begin
      if WebApplication.RunParams[0] = FileAuthCodes[i] then
      begin
        FileAuthCodes.Delete(i);
        WebApplication.SendFile(WebApplication.RunParams[1], True);
        break;
      end;
    end;
  end;
end;
Edit: Sollte dazu sagen das die Anwendung im Browser etwa so aufegrufen wird: http://127.0.0.1/?56482&C:/attachment.rar


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz