TsgcWebSocketHTTPServer › Events › OnHTTPUploadReadInput
Fires when the multipart/form-data decoder reads a non-file input field so its value can be captured.
public event TsgcWSHTTPUploadReadInputEventHandler OnHTTPUploadReadInput;
// delegate void TsgcWSHTTPUploadReadInputEventHandler(TObject Sender, string aName, string aValue)
—
OnHTTPUploadReadInput is raised for every form field in a multipart/form-data body that is not a file upload (plain <input> values, text areas...). aName carries the field name and aValue the decoded value; use the pair to populate a metadata record that accompanies the files received through OnHTTPUploadBeforeSaveFile / OnHTTPUploadAfterSaveFile. Requires HTTPUploadFiles.StreamType = pstFileStream with HTTPUploadFiles.RemoveBoundaries enabled, otherwise the raw boundary body is left in the POST stream and this event does not fire.
private void OnHTTPUploadReadInputEvent(TObject Sender, string aName, string aValue)
{
DoLog("Input value Received: " + aName + ":" + aValue);
}