TsgcWSPServer_Files › Events › OnFileReceivedError
Fired when an error occurs while receiving a file from a client.
property OnFileReceivedError: TsgcWSFileErrorEvent;
// TsgcWSFileErrorEvent = procedure(Connection: TsgcWSConnection; const aMessage: TsgcWSMessageFile; const Error: String) of object
—
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.
procedure TForm1.oFilesFileReceivedError(Connection: TsgcWSConnection;
const aMessage: TsgcWSMessageFile; const Error: String);
begin
Memo1.Lines.Add(Format('receive error: %s (%s)', [aMessage.FileName, Error]));
end;