Good day, dear experts. Faced the following problem: you need to send a file to some server. Did this:

http:=TIdHTTP.Create; stream:=TIdMultiPartFormDataStream.Create; http.Request.ContentType:='multipart/form-data'; stream.AddFile('file', 'e:\sampl.xml', 'multipart/form-data'); Http.post(SERV_URL, stream); stream.free; http.free; 

Unfortunately, nothing good comes of it. Nothing bad happens, as well as good. In short, nothing new appears on the server. Please tell me what could be the problem.

Dear experts. Sorry for the question, the problem was not in me and not in my code, but in the sloppiness of 3 persons. Just the files were not saved where agreed. The question is closed

2Vahan Av everything is normal and the stream is saved. Other components except TIdHTTP could not be used according to the TOR.

    1 answer 1

    Well naturally Http.post (SERV_URL, stream); Sends a post request to the server so that this file appears on the server. You need to process this request on the server (although I honestly don’t know how to handle the stream on the server) Better use TidFTP.