title: Delphi idHTTP upload file
body: <p>I try to upload file to sharepoint 2013 using standart form. I use <code>TIdHTTP</code>, <code>TIdSSLIOHandlerSocketOpenSSL</code> and <code>TIdLogDebug</code> components:</p>
  
  <pre><code>procedure TForm1.Button3Click(Sender: TObject);
  var
    DS: TIdMultipartFormDataStream;
  begin
    DS := TIdMultiPartFormDataStream.Create;
    try
      DS.AddFile('ctl00$PlaceHolderMain$UploadDocumentSection$ctl05$InputFile', 'C:\1.txt', 'text/html');
      IdHTTP1.Request.Username := 'user';
      IdHTTP1.Request.Password := 'pwd';
      IdHTTP1.Post('h***s://mysite.com/sites/studybi/_layouts/15/UploadEx.aspx?List=%7bBFE10E5D-E96F-4CF3-B42A-A17AE987161D%7d&amp;RootFolder=&amp;IsDlg=1', DS);
    finally
      DS.Free;
    end;
  end;
  
  procedure TForm1.IdHTTP1SelectAuthorization(Sender: TObject;
    var AuthenticationClass: TIdAuthenticationClass; AuthInfo: TIdHeaderList);
  begin
    AuthenticationClass := TIdNTLMAuthentication;
  end;
  </code></pre>
  
  <p>On event <code>TIDDebugLog.OnReceive</code> get error <code>401 Unauthorized</code>:</p>
  
  <pre><code>HTTP/1.1 401 Unauthorized
  Cache-Control: private
  Content-Length: 16
  Content-Type: text/plain; charset=utf-8
  SPRequestGuid: 6d55159d-3f0a-d03f-d7bc-9c7f506c0196
  request-id: 6d55159d-3f0a-d03f-d7bc-9c7f506c0196
  X-FRAME-OPTIONS: SAMEORIGIN
  SPRequestDuration: 53
  SPIisLatency: 5
  X-AspNet-Version: 4.0.30319
  X-Powered-By: ASP.NET
  WWW-Authenticate: NTLM
  X-Content-Type-Options: nosniff
  X-MS-InvokeApp: 1; RequireReadOnly
  MicrosoftSharePointTeamServices: 15.0.0.4551
  Date: Tue, 30 Jun 2015 06:31:41 GMT
  Connection: close
  </code></pre>
  
  <p>What I need to fix this error?</p>