I was replying to questions on webserver related questions, but ironically I cannot make my own webserver to receive files. I think I had similar experience in the past, but cannot remember how I solved it.
Server-side code is as following. It will display the local file names.
procedure TwmWebTests.upfileRequest(Sender: TObject; ARequest: TRequest;
AResponse: TResponse; var Handled: Boolean);
var
i: integer;
s: string;
begin
s := Format('Files uploaded (count=%d):<br>', [ARequest.Files.Count]);
for i := 0 to ARequest.Files.Count-1 do begin
s += ARequest.Files[i].LocalFileName + '<br>';
end;
AResponse.Content := s;
Handled:= True;
end;
And html file that sends file to the server is :
<!Doctype html>
<html>
<head>
</head>
<body>
<form method="post" action="http://localhost/myapp/upfile" target="_blank">File Upload
<input type="file" name="files"><br>
<input type="submit">
</form>
</body>
</html>
When I select a file and submit from the browser, it displays following. So, there are no problem in setting up webserver itself.
Files Uploaded (count=0):
Server is Windows Server 2019 Standard.