TsgcWSPClient_Files › Events › OnFileReceived
Fires when an incoming file has been fully received and persisted to disk.
property OnFileReceived: TsgcWSFileEvent;
// TsgcWSFileEvent = procedure(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile) of object
—
Raised after the last fragment is written and, for qosLevel1 and qosLevel2, after the file-received acknowledgment has been sent to the server. aMessage.FileName points to the saved file inside Files.SaveDirectory (or the path chosen in OnFileReceivedAuthorization).
procedure TForm1.oProtocolFileReceived(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile);
begin
Memo1.Lines.Add('file saved: ' + aMessage.FileName);
end;