TsgcWSPClient_FilesEvents › OnFileSentError

OnFileSentError Event

Fires when the upload of a file fails either locally or after a rejection from the server.

Syntax

property OnFileSentError: TsgcWSFileErrorEvent;
// TsgcWSFileErrorEvent = procedure(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile; const Error: String) of object

Default Value

Remarks

The internal QoS queue entry and sent stream are removed before the handler runs, so the upload is considered finished. Error carries the server-reported reason (for example a qosLevel2 rejection raised in OnFileReceivedAuthorization) or the local exception message.

Example

procedure TForm1.oProtocolFileSentError(Connection: TsgcWSConnection;
  const aMessage: TsgcWSMessageFile; const Error: String);
begin
  Memo1.Lines.Add('send error ' + aMessage.FileId + ': ' + Error);
end;

Back to Events