TsgcWSPServer_Files › Events › OnFileBeforeSent
Fired before a file is sent, allowing inspection and customization of the outgoing file metadata.
property OnFileBeforeSent: TsgcWSFileBeforeEvent;
// TsgcWSFileBeforeEvent = procedure(const aMessage: TsgcWSMessageFile) of object
—
Fires while the file header is being built and before the first fragment travels on the wire. You can inspect or alter aMessage.FileName, aMessage.FileId, aMessage.Data or the declared aMessage.FileSize if you need to advertise a different name or payload to the receiver.
procedure TForm1.oFilesFileBeforeSent(const aMessage: TsgcWSMessageFile);
begin
aMessage.Data := 'signed';
end;