TsgcWSPClient_Files › Events › OnFileBeforeSent
Fires just before the file header leaves the client, letting you inspect or tweak the outgoing TsgcWSMessageFile.
property OnFileBeforeSent: TsgcWSFileBeforeEvent;
// TsgcWSFileBeforeEvent = procedure(const aMessage: TsgcWSMessageFile) of object
—
At this point aMessage exposes FileName, FileSize, FileId, BufferSize, QoS and the custom Data payload assembled by SendFile. Use the event to log the pending upload, enrich the Data property or abort the transfer by raising an exception.
procedure TForm1.oProtocolFileBeforeSent(const aMessage: TsgcWSMessageFile);
begin
Memo1.Lines.Add('sending ' + aMessage.FileName);
end;