Hmm..
Schau mal hier:
https://stackoverflow.com/questions/...e-with-tidhttp
Zitat:
I found the problem. It was about the boundary that I must to set. So the final result is:
Delphi-Quellcode:
DS := TIdMultiPartFormDataStream.Create;
DS.AddFile('fileUpload2', 'C:\Users\r.rezino\Desktop\teste.po', 'application/octet-stream');
try
FHttpComunication.Request.ContentType := 'multipart/form-data; boundary=' + DS.Boundary;
FHttpComunication.Request.AcceptEncoding := '';
FHttpComunication.Request.Accept := '';
FHttpComunication.Request.Host := '';
FHttpComunication.Request.UserAgent := '';
FHttpComunication.Put(UrlCmd, DS, Response);
finally
DS.Free;
Response.Free;
end;
Wenn ich das richtig verstanden habe, wird beim POST automatisch das richtige ContentType und boundary gesetzt.
Jedoch bei PUT musst Du das selber machen..