TsgcWSPClient_Files › Events › OnFileSentError
Fires when the upload of a file fails either locally or after a rejection from the server.
property OnFileSentError: TsgcWSFileErrorEvent;
// TsgcWSFileErrorEvent = procedure(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile; const Error: String) of object
—
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.
procedure TForm1.oProtocolFileSentError(Connection: TsgcWSConnection;
const aMessage: TsgcWSMessageFile; const Error: String);
begin
Memo1.Lines.Add('send error ' + aMessage.FileId + ': ' + Error);
end;