TsgcWSPServer_FilesEvents › OnFileReceivedError

OnFileReceivedError Event

Fired when an error occurs while receiving a file from a client.

Syntax

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

Default Value

Remarks

Fires when a partial transfer is aborted because of a validation failure, a rejected authorization, a canceled fragment, or a size mismatch between the declared FileSize and the bytes actually received. The partial file is deleted and the sender is notified.

Example

procedure TForm1.oFilesFileReceivedError(Connection: TsgcWSConnection;
  const aMessage: TsgcWSMessageFile; const Error: String);
begin
  Memo1.Lines.Add(Format('receive error: %s (%s)', [aMessage.FileName, Error]));
end;

Back to Events